就是把图片上传到mysql一个blob自段,再读取。

解决方案 »

  1.   

    string regexStr = "[-+]?\\b[0-9]+(\\.[0-9]+)?\\b";
      

  2.   

    //****你选用以二制流的形式保存图片,最后以流的形式读取就可以了.//****读取二制流图片为
      byte[] mbyte;
            MemoryStream mMemoryStream = new MemoryStream(mbyte);
            Request.BinaryRead(mMemoryStream.Length);
      

  3.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>The Code Project - Member Logon - Free Source Code and Tutorials</title>
    <base target="_top" />
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <meta http-equiv="Reply-to" content="mailto:[email protected]" />
    <meta name="Description" content="Free source code and tutorials for Windows developers." />
    <meta name="Keywords" content="Free source code, Visual C++, C#, C Sharp, .NET, ASP.NET, VB.NET, ADO.NET, COM+, Windows, libraries, MFC, development tools, C++, GUI, Microsoft Foundation Class, MFC, C++, GUI, ASP, XML, UML, SOAP, ATL, VB, ADO, SQL, DCOM, COM, Windows DNA, CToolBar, CMenu, CDockBar, CButton, CEdit, CStatic, CListCtrl, CTreeCtrl, CTreeView, CListView, CListBox, CFrameWnd, CMDIFrameWnd, CStatusBar, CTabCtrl" />
    <link rel="alternate" type="application/rss+xml" title="CodeProject Lounge Postings" href="http://www.codeproject.com/webservices/LoungeRSS.aspx" />
    <link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - All topics" href="http://www.codeproject.com/webservices/articlerss.aspx?cat=1" />
    <link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - MFC / C++" href="http://www.codeproject.com/webservices/articlerss.aspx?cat=2" />
    <link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - C#" href="http://www.codeproject.com/webservices/articlerss.aspx?cat=3" />
    <link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - ASP.NET" href="http://www.codeproject.com/webservices/articlerss.aspx?cat=4" />
    <link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - .NET" href="http://www.codeproject.com/webservices/articlerss.aspx?cat=5" />
    <link rel="icon" href="/favicon.ico" type="image/ico" />
    <link rel="SHORTCUT ICON" href="/favicon.ico" />
    <link rel="stylesheet" type="text/css" href="/styles/global.css" />
    </head><body text="black" bgcolor="white" alink="red" link="blue" vlink="navy" style="margin: 0"><!-- COPYRIGHT 2006 I/PRO Corporation ALL RIGHTS RESERVED. - Page view auditing -->
    <script type="text/javascript" language="JavaScript">
    var LSPT="";
    LSPT += "?durl=" + escape(document.URL);
    LSPT += "&hostname=" + location.hostname;
    LSPT += "&url=" + location.pathname;
    LSPT += "&query=" + escape(location.search) + escape(location.hash);
    LSPT += "&referrer=" + escape(document.referrer);
    LSPT += "&browser=" + escape(navigator.appName);
    LSPT += "&version=" + escape(navigator.appVersion);
    LSPT += "&os=" + escape(navigator.platform);
    LSPT += "&xdomain=codeproject.com";
    LSPT += "&custid=codeproject";
    </script>
    <script type="text/javascript">
    document.write('<img src=http://'+'content.ipro.com/images/pixel.gif'+LSPT+' height="1" width="1" style="position:absolute; top:0px; left:0px">');
    </script>
    <noscript>
    <img src="http://content.ipro.com/images/pixel?version=nonjava" height="1" width="1" style="position:absolute;top:0px;left:0px">
    </noscript>
    <!-- END I/PRO PAGE TAG --><script type="text/javascript">
    if (top != self) top.location.href = location.href;
    window.onerror = new Function("return false;");
    //window.onload = init;
    </script><table width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr valign="top">
    <td colspan="2">
    <table width="100%" cellspacing="0" cellpadding="0" border="0">
    <tr>
    <td class="HeaderLogo"><a href="/"><img alt="Home" border="0" height="90" src="/images/standard/codeproject225x90.gif" /></a></td>
    <td class="HeaderBanner"><span id=AdBanner4><iframe src="http://c5.zedo.com/jsc/c5/ff2.html?n=582;c=1;s=1;d=14;w=728;h=90" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" allowTransparency="true" width="728" height="90"></iframe></span></td>
    </tr>
    <tr><td colspan="2">

    <table cellpadding="5" cellspacing="0" width="100%" class="MemberNavBar">
    <tr><td class="smallText" style="font-weight:bold">3,250,473 members and growing!</td>
    <td align="right" class="userNavText">
    <form name="subForm" id="subForm" action="/script/profile/process_logon.asp" method="post" style="margin:0;padding:0;">
    Email <input class="tinyText" type="text" name="Email" id="Email" style="width:100" />
    Password <input class="tinyText" type="password" name="Password" id="Password" style="width:60" />
    <input type="submit" value="Sign in" class="FormButton" />
    <input type="checkbox" checked name="cookie" id="RememberMeCheck"><label for="RememberMeCheck">Remember me?</label>
    <a href="/script/profile/forgot.asp"><img align="absmiddle" src="/images/HLP.GIF" width="16" height="16" border="0" />
    Lost your password?</a>
    </form>
    </td>
    </tr>
    </table>
    </td></tr>

    <tr><td colspan="2">

    <table cellpadding="0" cellspacing="0" class="SiteNavBar" id="tblSiteToolbar">
    <tr>
    <td><a href="/">Home</a></td>
    <td  nowrap><a href="/index.asp?cat=2" >MFC/C++</a></td>
    <td ><a href="/index.asp?cat=3">C#</a></td>
    <td class="SelCat" nowrap><a href="/index.asp?cat=4" >ASP.NET</a></td>
    <td ><a href="/index.asp?cat=5">.NET</a></td>
    <td  nowrap><a href="/index.asp?cat=6">VB.NET</a></td>
    <td  nowrap><a href="/index.asp?cat=1">All Topics</a></td>
    <td width="100%">&nbsp;</td>
    <td>
    <div id='MenuPos' style='position: relative; width: 380; height: 22;top:1'>
    <table width="380" cellpadding="0" cellspacing="0" style="border-width:0;height:20">
    <tr valign="middle">
    <td nowrap style="border-width:0"><a href='/info/faq.asp'>Help!</a></td>
    <td nowrap style="border-width:0"><a href='/info/latest.asp'>Articles</a></td>
    <td nowrap style="border-width:0"><a href='/script/comments/forums.asp'>Message Boards</a></td>
    <td nowrap style="border-width:0"><a href='/store/'>StoreFront</a></td>
    <td nowrap style="border-width:0"><a href='/lounge.asp'>Lounge</a></td>
    </tr>
    </table>
    </div>
    </td>
    </tr>
    </table>
    <script type='text/javascript'>function Go(){return}</script>
    <script type='text/javascript' src='/script/HVMenu/cpmenu_var.js'></script>
    <script type='text/javascript' src='/script/HVMenu/menu10_com.js'></script> </td></tr>
    </table>
    </td>
    </tr><tr valign="top">
    <td class="LHNavBar">
    <div style="text-align:center;padding-top:5;">
    <iframe src="http://c5.zedo.com/jsc/c5/ff2.html?n=582;c=1;s=1;d=16;w=150;h=80" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" allowTransparency="true" width="150" height="80"></iframe>
    <br /><br />
    </div>

    <script type="text/javascript">
    function ToggleMenu(itemName)
    {
    var elm = document.getElementById(itemName);
    var i,others = document.getElementById('SectionMenu');
    for(i=0; i < others.childNodes.length; i++)
    {
    var other = others.childNodes[i];
    if ((other.className == 'MenuGroup') && (other != elm)) other.style.display='none';
    }
    if (elm.style.display == 'block') elm.style.display='none';
    else elm.style.display='block';
    return false;
    }
    function OpenMenuItem(subCat,section)
    {
    var i,menuelms = document.getElementById('SectionMenu');
    for(i=0; i < menuelms.childNodes.length; i++)
    {
    var menuelm = menuelms.childNodes[i];
    if ((menuelm.className == 'MenuGroup') && (menuelm.id == 'SubCat'+subCat.toString()))
    {
    menuelm.style.display = 'block';
    for(j=0; j < menuelm.childNodes.length; j++)
    {
    var subelm = menuelm.childNodes[j];
    if ((subelm.className == 'MI') && (subelm.id == 'Section'+section.toString()))
    {
    subelm.style.backgroundColor='#FBEDBB';
    subelm.firstChild.style.backgroundColor='#FBEDBB';
    break;
    }
    }
    break;
    }
    }
    return false;
      

  4.   


    </script>
    <div id="SectionMenu">
    <div class="MenuCat">Sections</div>
    <div class="MenuSubCat"><a href="/script/articles/subcat.asp?id=2" onclick="return ToggleMenu('SubCat2');">.NET - General</a></div>
    <div class="MenuGroup" id="SubCat2" style="display:none;">
    <div class="MI" id="Section45"><a href='/aspnet/'>ASP.NET</a></div>
    <div class="MI" id="Section46"><a href='/managedcpp/'>Managed C++</a></div>
    <div class="MI" id="Section47"><a href='/dotnet/'>.NET</a></div>
    <div class="MI" id="Section50"><a href='/soap/'>SOAP and XML</a></div>
    <div class="MI" id="Section72"><a href='/vb/net/'>VB.NET</a></div>
    <div class="MI" id="Section51"><a href='/webservices/'>C++ Web Services</a></div>
    <div class="MI" id="Section82"><a href='/netcf/'>.NET Compact Framework</a></div>
    <div class="MI" id="Section83"><a href='/cpnet/'>Cross Platform</a></div>
    <div class="MI" id="Section84"><a href='/smartclient/'>Smart Client</a></div>
    </div>
    <div class="MenuSubCat"><a href="/script/articles/subcat.asp?id=16" onclick="return ToggleMenu('SubCat16');">C# Windows Forms</a></div>
    <div class="MenuGroup" id="SubCat16" style="display:none;">
    <div class="MI" id="Section78"><a href='/cs/combobox/'>Combo & Listboxes</a></div>
    <div class="MI" id="Section79"><a href='/cs/menu/'>Menus &amp; Toolbars</a></div>
    <div class="MI" id="Section68"><a href='/cs/miscctrl/'>C# Controls</a></div>
    </div>
    <div class="MenuSubCat"><a href="/script/articles/subcat.asp?id=17" onclick="return ToggleMenu('SubCat17');">General C#</a></div>
    <div class="MenuGroup" id="SubCat17" style="display:none;">
    <div class="MI" id="Section48"><a href='/csharp/'>C# Programming</a></div>
    <div class="MI" id="Section86"><a href='/cs/algorithms/'>C# Algorithms</a></div>
    <div class="MI" id="Section75"><a href='/cs/media/'>Multimedia</a></div>
    <div class="MI" id="Section74"><a href='/cs/database/'>C# Database</a></div>
    <div class="MI" id="Section73"><a href='/cs/webservices/'>C# WebServices</a></div>
    <div class="MI" id="Section87"><a href='/cs/library/'>C# Libraries</a></div>
    <div class="MI" id="Section88"><a href='/cs/internet/'>Internet / Network</a></div>
    <div class="MI" id="Section89"><a href='/cs/samples/'>C# Samples</a></div>
    <div class="MI" id="Section90"><a href='/cs/files/'>Files and Folders</a></div>
    <div class="MI" id="Section91"><a href='/cs/design/'>Design and Architecture</a></div>
    <div class="MI" id="Section92"><a href='/cs/system/'>System Programming</a></div>
    <div class="MI" id="Section93"><a href='/cs/threads/'>Threads and Processes</a></div>
    </div>
    <div class="MenuSubCat"><a href="/script/articles/subcat.asp?id=3" onclick="return ToggleMenu('SubCat3');">MFC Controls</a></div>
    <div class="MenuGroup" id="SubCat3" style="display:none;">
    <div class="MI" id="Section4"><a href='/buttonctrl/'>Button Controls</a></div>
    <div class="MI" id="Section56"><a href='/dialog/'>Dialog and Windows</a></div>
    <div class="MI" id="Section5"><a href='/combobox/'>Combo and List Boxes</a></div>
    <div class="MI" id="Section57"><a href='/menu/'>Menus</a></div>
    <div class="MI" id="Section6"><a href='/docking/'>Toolbars / Docking Windows</a></div>
    <div class="MI" id="Section58"><a href='/statusbar/'>Status Bar</a></div>
    <div class="MI" id="Section7"><a href='/editctrl/'>Edit Controls</a></div>
    <div class="MI" id="Section8"><a href='/listctrl/'>List Controls</a></div>
    <div class="MI" id="Section9"><a href='/treectrl/'>Tree Controls</a></div>
    <div class="MI" id="Section10"><a href='/tabctrl/'>Tab Controls</a></div>
    <div class="MI" id="Section11"><a href='/property/'>Property Sheets</a></div>
    <div class="MI" id="Section12"><a href='/richedit/'>Rich Edit Control</a></div>
    <div class="MI" id="Section13"><a href='/splitter/'>Splitter Windows</a></div>
    <div class="MI" id="Section14"><a href='/staticctrl/'>Static Controls</a></div>
    <div class="MI" id="Section15"><a href='/miscctrl/'>Miscellaneous Controls</a></div>
    </div>
    <div class="MenuSubCat"><a href="/script/articles/subcat.asp?id=4" onclick="return ToggleMenu('SubCat4');">General C++</a></div>
    <div class="MenuGroup" id="SubCat4" style="display:none;">
    <div class="MI" id="Section16"><a href='/com/'>COM/DCOM/COM+</a></div>
    <div class="MI" id="Section17"><a href='/cpp/'>C++ / MFC</a></div>
    <div class="MI" id="Section18"><a href='/clipboard/'>Clipboard</a></div>
    <div class="MI" id="Section19"><a href='/docview/'>Doc / View</a></div>
    <div class="MI" id="Section20"><a href='/debug/'>Debug tips</a></div>
    <div class="MI" id="Section21"><a href='/database/'>Database</a></div>
    <div class="MI" id="Section22"><a href='/dll/'>DLLs</a></div>
    <div class="MI" id="Section23"><a href='/file/'>Files and Folders</a></div>
    <div class="MI" id="Section36"><a href='/internet/'>Internet &amp; Network</a></div>
    <div class="MI" id="Section24"><a href='/macro/'>Macros and Add-ins</a></div>
    <div class="MI" id="Section25"><a href='/printing/'>Printing</a></div>
    <div class="MI" id="Section26"><a href='/samples/'>Samples</a></div>
    <div class="MI" id="Section27"><a href='/string/'>String</a></div>
    <div class="MI" id="Section28"><a href='/system/'>System</a></div>
    <div class="MI" id="Section29"><a href='/threads/'>Threads, Processes &amp; IPC</a></div>
    <div class="MI" id="Section30"><a href='/tips/'>Programming Tips</a></div>
    <div class="MI" id="Section31"><a href='/tools/'>Free Tools</a></div>
    <div class="MI" id="Section32"><a href='/shell/'>Shell Programming</a></div>
    <div class="MI" id="Section33"><a href='/datetime/'>Date / Time</a></div>
    <div class="MI" id="Section35"><a href='/winhelp/'>WinHelp/HTMLHelp</a></div>
    </div>
      

  5.   

    <div class="MenuSubCat"><a href="/script/articles/subcat.asp?id=5" onclick="return ToggleMenu('SubCat5');">C++ Libraries</a></div>
    <div class="MenuGroup" id="SubCat5" style="display:none;">
    <div class="MI" id="Section38"><a href='/atl/'>ATL</a></div>
    <div class="MI" id="Section39"><a href='/wtl/'>WTL</a></div>
    <div class="MI" id="Section69"><a href='/vcpp/stl/'>STL</a></div>
    <div class="MI" id="Section40"><a href='/library/'>Libraries & Projects</a></div>
    </div>
    <div class="MenuSubCat"><a href="/script/articles/subcat.asp?id=6" onclick="return ToggleMenu('SubCat6');">C++ Multimedia</a></div>
    <div class="MenuGroup" id="SubCat6" style="display:none;">
    <div class="MI" id="Section41"><a href='/bitmap/'>Bitmaps &amp; Palettes</a></div>
    <div class="MI" id="Section42"><a href='/audio/'>Audio and Video</a></div>
    <div class="MI" id="Section43"><a href='/directx/'>DirectX</a></div>
    <div class="MI" id="Section44"><a href='/opengl/'>OpenGL</a></div>
    <div class="MI" id="Section55"><a href='/gdi/'>Fonts &amp; GDI</a></div>
    <div class="MI" id="Section70"><a href='/vcpp/gdiplus/'>GDI+</a></div>
    </div>
    <div class="MenuSubCat"><a href="/script/articles/subcat.asp?id=7" onclick="return ToggleMenu('SubCat7');">Platforms - All</a></div>
    <div class="MenuGroup" id="SubCat7" style="display:none;">
    <div class="MI" id="Section34"><a href='/win32/'>Win32 / SDK</a></div>
    <div class="MI" id="Section52"><a href='/w2k/'>Windows 2000 / XP</a></div>
    <div class="MI" id="Section53"><a href='/ce/'>Mobile / Embedded</a></div>
    <div class="MI" id="Section54"><a href='/java/'>Java Programming</a></div>
    <div class="MI" id="Section94"><a href='/winfx/'>Vista / WinFX</a></div>
    </div>
    <div class="MenuSubCat"><a href="/script/articles/subcat.asp?id=8" onclick="return ToggleMenu('SubCat8');">Web/Scripting</a></div>
    <div class="MenuGroup" id="SubCat8" style="display:none;">
    <div class="MI" id="Section59"><a href='/html/'>HTML / CSS</a></div>
    <div class="MI" id="Section85"><a href='/Ajax/'>AJAX / Atlas</a></div>
    <div class="MI" id="Section60"><a href='/asp/'>ASP</a></div>
    <div class="MI" id="Section61"><a href='/vbscript/'>VB / VBScript</a></div>
    <div class="MI" id="Section62"><a href='/jscript/'>JavaScript</a></div>
    <div class="MI" id="Section63"><a href='/perl/'>PERL</a></div>
    <div class="MI" id="Section37"><a href='/isapi/'>ISAPI</a></div>
    </div>
    <div class="MenuSubCat"><a href="/script/articles/subcat.asp?id=15" onclick="return ToggleMenu('SubCat15');">General Reading</a></div>
    <div class="MenuGroup" id="SubCat15" style="display:none;">
    <div class="MI" id="Section1"><a href='/books/'>Book Chapters</a></div>
    <div class="MI" id="Section76"><a href='/gen/bookreview/'>Book Reviews</a></div>
    <div class="MI" id="Section66"><a href='/buglist/'>Bugs and Workarounds</a></div>
    <div class="MI" id="Section80"><a href='/gen/design/'>Design and Strategy</a></div>
    <div class="MI" id="Section2"><a href='/interview/'>Interviews</a></div>
    <div class="MI" id="Section3"><a href='/scrapbook/'>The Scrapbook</a></div>
    <div class="MI" id="Section65"><a href='/useritems/'>Unedited Reader Contributions</a></div>
    <div class="MI" id="Section77"><a href='/gen/work/'>Work Issues</a></div>
    <div class="MI" id="Section81"><a href='/purgatory/'>Purgatory</a></div>
    <div class="MI" id="Section71"><a href='/showcase/'>Product Showcase</a></div>
    </DIV>
    <br />
    <div class="MenuCat">Community</div>
    <div class="MenuSubCat"><a href='/script/articles/sections.asp'>Site Map</a></div>
    <div class="MenuSubCat"><a href='/info/cpstuff.asp'>CodeProject Stuff</a></div>
    <div class="MenuSubCat"><a href='/script/profile/whos_who.asp'>CodeProject Member List</a></div>
    <div class="MenuSubCat"><a href='/script/industry/industry.asp'>IT Industry Contacts List</a></div>
    <div class="MenuSubCat"><a href='/script/admentor/ads.asp'>Our Advertisers</a></div>
    <div class="MenuSubCat"><a href='/script/common/mailform.asp?option=TellFriend'>Tell a Friend</a></div><div class="MenuSubCat"><a title='Add this page to your Favorites' href='#'onclick='window.external.AddFavorite(document.location.href,document.title);return false;'>Add To Favorites</a></div></DIV>
    <br />
    <div class="MenuCat">The Code Project</div>
    <div class="MenuSubCat"><a href='/Feature/awards/'>Awards</a></div>
    <div class="MenuSubCat"><a href='/info/about.asp'>About Us</a></div>
    <div class="MenuSubCat"><a href='/info/MediaKit'>Media kit &amp; Advertising info</a></div>
    <div class="MenuSubCat"><a href='/script/jobs/jobs.asp'>Jobs Board</a></div>
    <div class="MenuSubCat"><a href='/info/latest.asp'>Latest Articles</a></div>
    <div class="MenuSubCat"><a href='/script/newsletter/newsletters/'>Newsletter Archive</a></div>
    <div class="MenuSubCat"><a href='/script/survey/list.asp'>Weekly Surveys</a></div>
    <div class="MenuSubCat"><a href='/script/PressRelease/pr.asp'>Press Releases</a></div>
    <div class="MenuSubCat"><a href='/script/rumor/list.asp'>Latest News</a></div>
    <div class="MenuSubCat"><a href='/info/submit.asp'>Submit an Article</a></div>
    </div><br />
    <div class="MenuCat">Partners</div>
    <div class="MenuSubCat"><a href="http://www.theultimatetoolbox.com">The Ultimate Toolbox</a></div>
    <div class="MenuSubCat"><a href="http://www.aspalliance.com/">ASP Alliance</a></div>
    <div class="MenuSubCat"><a href="http://www.developerfusion.co.uk/">Developer Fusion</a></div>
    <div class="MenuSubCat"><a href="http://www.developersdex.com/">Developersdex</a></div>
    <div class="MenuSubCat"><a href="http://www.devguru.com/">DevGuru</a></div>
    <div class="MenuSubCat"><a href="http://www.planet-source-code.com/">Planet Source Code</a></div>
    <div class="MenuSubCat"><a href="http://www.programmersheaven.com/">Programmers Heaven</a></div>
    <div class="MenuSubCat"><a href="http://www.tek-tips.com/">Tek-Tips Forums</a></div>

    <!-- It's either this or use an IE hack http://www.webreference.com/programming/min-width/ -->
    <img src="/script/images/t.gif" height="1" width="160" />

    </td>
    <td class="ContentPane">

    <table class="SearchHeaderBar" cellspacing="0" width="100%">
    <tr>
    <td valign="middle" align="right" nowrap="nowrap" width="60%"> <form method="post" action="/info/search.asp" name="Search" style="margin:0;">
    <b>Search &nbsp;</b><input class="smallText" name="target" style="width:200;" />
    <select style="font-weight:bold;font-size:8pt" name="st">
    <option value="kw">Articles</option>
    <option value="au">Authors</option>
    </select>
    <input type="submit" style="font-weight:bold;font-size:8pt" value=" Go! " /> &nbsp;
    </form>
    </td>