我正在VS 2008中開發C#/ SQL ASP.NET Web應用程序。目前我使用Server.Transfer方法將控件從一個ASPX.CS文件轉移到另一個ASPX文件。第一次通過,這是有效的。但控制轉移到這個新文件後,它遇到一個條件:Server.transfer導致HttpException
if (restart == false)
{
其中「重新啓動」是一個布爾變量。在此語句之後,它立即將控制權轉移回相同的ASPX.CS文件並嘗試重新執行Server.Transfer方法。這次它給了我下面的異常和堆棧跟蹤。你知道這是什麼原因嗎?我試圖閱讀這個,但對我來說沒有多大意義。
System.Web.HttpException被用戶代碼未處理 Message =「執行DataMatch.aspx的子請求時出錯。 源= 「的System.Web」 錯誤碼= -2147467259 堆棧跟蹤: 在System.Web.HttpServerUtility.Execute(字符串路徑,TextWriter的作家,布爾preserveForm) 在System.Web.HttpServerUtility.Transfer(字符串路徑,布爾preserveForm ) at System.Web.HttpServerUtility.Transfer(String path) at AddFileToSQL._Default.btnAppend_Click(Object sender,EventArgs e)in C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ Default.aspx.cs:line 109 at System.Web.UI.HtmlControls.HtmlInputButton.OnServerClick(EventArgs e) at System.Web.UI.HtmlControls.HtmlInputButton.RaisePostBackEvent(String eventArgument) at System.Web.UI .HtmlControls.HtmlInput Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(字符串eventArgument) 在System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl,字符串eventArgument) 在System.Web.UI.Page.RaisePostBackEvent(NameValueCollection中POSTDATA) 在System.Web.UI.Page.ProcessRequestMain(布爾includeStagesBeforeAsyncPoint,布爾includeStagesAfterAsyncPoint) InnerException:System.Web.HttpCompileException Message =「c:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx(14):錯誤CS1502:'System.Web.UI.HtmlControls.HtmlTableRowCollection.Add(System.Web.UI.HtmlControls.HtmlTableRow)'的最佳重載方法匹配'有一些無效參數「 Source =」System .Web「 ErrorCode = -2147467259 SourceCode =「#pragma checksum \」C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\」{406ea660-64cf-4c82-b6f0-42d48172a799} \ 「\」76750ABD913CF678D216C1E9CFB62BDF \「\ r \ n // -------------------------------------- ---------------------------------------- \ r \ n // \ r \ n //此代碼是由工具生成的。\ r \ n //運行時版本:2.0.50727.3603 \ r \ n // \ r \ n //對此文件的更改可能會導致錯誤的行爲,如果\ r \ n //代碼被重新生成。\ r \ n // \ r \ n // ------------------------------ ------------------------------------------------ \ r \ n \ r \ n \ n \ n \ n使用系統時,您可以使用\ n \ line \ 285 \「C:\ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727 \ Config \ web.config \」\ r \ n。 Web.Profile; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 280 \「C:\ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727 \ Config \ web.config \「\ r \ n using System.Text.RegularExpressions; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 28 2 \「C:\ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727 \ Config \ web.config \」\ r \ n using System.Web.Caching; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 278 \「C:\ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727 \ Config \ web.config \」\ r \ n using System.Configuration; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 277 \「C:\ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727 \ Config \ web.config \ 「\ r \ n using System.Collections.Specialized; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 19 \」C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n using System.Web.UI.WebControls.WebParts; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 289 \「C:\ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727 \ Config \ web。config \「\ r \ n using System.Web.UI.HtmlControls; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 19 \」C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n using System.Web.UI.WebControls; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 19 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \」\ r \ n using System.Web.UI; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 276 \「C:\ WINDOWS \ Microsoft.NET \ Framework \ v2。 0.50727 \ Config \ web.config \「\ r \ n using System.Collections; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 275 \」C :\ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727 \ Config \ web.config \「\ r \ n使用系統; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 284 \「C:\ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727 \ Config \ web.config \」\ r \ n using System.Web.Security; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 281 \「C:\ WINDOWS \ Microso ft.NET \ Framework \ v2.0.50727 \ Config \ web.config \「\ r \ n using System.Web; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 283 \「C:\ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727 \ Config \ web.config \」\ r \ n using System.Web.SessionState; \ r \ n \ r \ n #line默認\ r \ n #line隱藏\ r \ n \ r \ n #line 279 \「C:\ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727 \ Config \ web.config \」\ r \ n使用系統。文本; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n \ r \ n [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()] \ r \ n public class datamatch_aspx :global :: AddFileToSQL.DataMatch,System.Web.SessionState.IRequiresSessionState,System.Web.IHttpHandler {\ r \ n \ r \ n private static bool @__ initialized; \ r \ n \ r \ n私有靜態對象@__fileDependencies; \ r \ n [System.Diagnostics.DebuggerNonUserCodeAttribute()] \ r \ n public datamatch_aspx(){\ r \ n string [] dependencies; \ r \ n((global :: AddFileToSQL.DataMatch)(this ))。AppRelativeVirtualPath = \「〜/ DataMatch.aspx \」; \ r \ n if((global :: ASP.datamatch_aspx。@ __ i nitialized == false)){\ r \ n dependencies = new string [1]; \ r \ n dependencies [0] = \「〜/ DataMatch.aspx \」; \ r \ n global :: ASP.datamatch_aspx。@ __fileDependencies = this.GetWrappedFileDependencies(dependencies); \ r \ n global :: ASP.datamatch_aspx。@ __ initialized = true; \ r \ n} \ r \ n this.Server.ScriptTimeout = 30000000; \ r \ n} \ r \ n \ r \ n受保護的System.Web.Profile.DefaultProfile配置文件{\ r \ n get {\ r \ n return((System.Web.Profile.DefaultProfile)(this.Context.Profile)); \ r \ n} \ r \ n返回((ASP.global_asax)(this.Context.ApplicationInstance)); \ r \ n}保護ASP.global_asax ApplicationInstance {\ r \ n返回\ r \ n私人全局:: System.Web.UI.HtmlControls.HtmlTitle @__ BuildControl__control3(){\ r \ n全局: :System.Web.UI.HtmlControls.HtmlTitle @__ ctrl; \ r \ n \ r \ n #line 6 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch。 ASPX \「\ r \ n @__ctrl = new global :: System.Web.UI.HtmlControls.HtmlTitle(); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n return @__ ctrl; \ r \ n} \ r \ n \ r \ n [System.Diagnostics.DebuggerNonUserCodeAttribute()] \ r \ n private global :: System.Web.UI.HtmlControls.HtmlHead @__ BuildControl__control2(){\ r \ n global :: System。 Web.UI.HtmlControls.HtmlHead @__ ctrl; \ r \ n \ r \ n #line 5 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \」 \ r \ n @__ctrl = new global :: System.Web.UI.HtmlControls.HtmlHead(\「head \」); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n global :: System.Web.UI.HtmlControls.HtmlTitle @__ ctrl1; \ r \ n \ r \ n #line 5 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ ctrl1 = this。@ __ BuildControl__control3(); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n System.Web.UI.IParserAccessor @__parser =((System.Web.UI.IParserAccessor)(@__ ctrl)); \ r \ n \ r \ n #line 5 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \」\ r \ n @__ parser.AddParsedSubObject(@__ ctrl1 ); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 5 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ parser.AddParsedSubObject(new System.Web.UI.LiteralControl(\」\ r \ n \ r \ n \ r \ n \ r \ n \ r \ n 「); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n return @__ ctrl; \ r \ n} \ r \ n \ r \ n [System.Diagnostics.DebuggerNonUserCodeAttribute ()] \ r \ n private global :: System.Web.UI.HtmlControls.HtmlTableRow @__ BuildControl__control5(){\ r \ n global :: System.Web.UI.HtmlControls.HtmlTableRow @__ ctrl; \ r \ n \ r \ n #line 15 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \」\ r \ n @__ctrl = new global :: System.Web.UI .HtmlControls。HtmlTableRow(); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n return @__ ctrl; \ r \ n} \ r \ n \ r \ n [System.Diagnostics.DebuggerNonUserCodeAttribute( )] \ r \ n private global :: System.Web.UI.WebControls.PlaceHolder @__ BuildControlphTextBoxes(){\ r \ n global :: System.Web.UI.WebControls.PlaceHolder @__ ctrl; \ r \ n \ r \ n #line 19 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \」\ r \ n @__ctrl = new global :: System.Web.UI。 WebControls.PlaceHolder(); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n this.phTextBoxes = @__ ctrl; \ r \ n \ r \ n #line 19 \「C: \ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ ctrl.ID = \」phTextBoxes \「; \ r \ n \ r \ n #line默認\ r \ n #line hidden \ r \ n return @__ ctrl; \ r \ n} \ r \ n \ r \ n [System.Diagnostics.DebuggerNonUserCodeAttribute()] \ r \ n private global :: System.Web。 UI.HtmlControls.HtmlTableCell @__ BuildControl__control8(){\ r \ n global :: System.Web.UI.HtmlControls.HtmlTableCell @__ ctrl; \ r \ n \ r \ n #line 18 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ctrl = new global :: System.Web.UI.HtmlControls.HtmlTableCell(\」td \「); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 18 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \」\ r \ n @__ctrl .Align = \「center \」; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 18 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ ctrl.VAlign = \」top \「; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n System.Web.UI.IParserAccessor @__parser =((System.Web.UI.IParserAccessor)(@__ ctrl)); \ r \ n \ r \ n #line 18 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ parser.AddParsedSubObject(new System.Web.UI.LiteralControl(\「\ r \ n \」)); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n global: :System.Web.UI.WebControls.PlaceHolder @__ ctrl1; \ r \ n \ r \ n #line 18 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch。 aspx \「\ r \ n @__ ctrl1 = this。@ __ BuildControlphTextBoxes(); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 18 \」C: \ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ parser.AddParsedSubObject(@__ ctrl1); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 18 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \」\ r \ n @__ parser.AddParsedSubObject(new System.Web.UI.LiteralControl(\「\ r \ n \」)); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n return @__ctrl ; \ r \ n} \ r \ n \ r \ n [System.Diagnostics.DebuggerNon UserCodeAttribute()] \ r \ n private global :: System.Web.UI.WebControls.Label @__ BuildControlInstructions(){\ r \ n global :: System.Web.UI.WebControls.Label @__ ctrl; \ r \ n \ r \ n #line 22 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \」\ r \ n @__ctrl = new global :: System.Web。 UI.WebControls.Label(); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n this.Instructions = @__ ctrl; \ r \ n @__ ctrl.ApplyStyleSheetSkin(this); \ r \ n \ r \ n #line 22 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \」\ r \ n @__ ctrl.ID = \「說明\「; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 22 \」C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ ctrl.Font.Italic = true; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 22 \「C:\ Documents and Settings \ Admin \ My Documents \ Vi sual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ ctrl.Text = \」現在從下拉列表中選擇您希望我的數據庫中的哪個表列「\ r \ n \」o將這些字段映射到\「; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n return @__ ctrl; \ r \ n} \ r \ n \ r \ n [System.Diagnostics .DebuggerNonUserCodeAttribute()] \ r \ n private global :: System.Web.UI.HtmlControls.HtmlTableCell @__ BuildControl__control9(){\ r \ n global :: System.Web.UI.HtmlControls.HtmlTableCell @__ ctrl; \ r \ n \ r \ n #line 21 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \」\ r \ n @__ctrl = new global :: System.Web .UI.HtmlControls.HtmlTableCell(\「td \」); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n System.Web.UI.IParserAccessor @__parser =((System。 Web.UI.IParserAccessor)(@__ ctrl)); \ r \ n \ r \ n #line 21 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch。aspx \「\ r \ n @__ parser.AddParsedSubObject(new System.Web.UI.LiteralControl(\」\ r \ n \「)); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n global :: System.Web.UI.WebControls.Label @__ ctrl1; \ r \ n \ r \ n #line 21 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ ctrl1 = this。@ __ BuildControlInstructions(); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n#第21行\ C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ parser.AddParsedSubObject(@__ ctrl1); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 21 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ parser.AddParsedSubObject(new System.Web.UI.LiteralControl(\」\ r \ n \「)); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n return @__ ctrl; \ r \ n} \ r \ n \ r \ n [System.Diagnostics.Debugge rNonUserCodeAttribute()] \ r \ n private global :: System.Web.UI.WebControls.Button @__ BuildControlbtnSubmit(){\ r \ n global :: System.Web.UI.WebControls.Button @__ ctrl; \ r \ n \ r \ n #line 26 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \」\ r \ n @__ctrl = new global :: System.Web。 UI.WebControls.Button(); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n this.btnSubmit = @__ ctrl; \ r \ n @__ ctrl.ApplyStyleSheetSkin(this); \ r \ n \ r \ n #line 26 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \」\ r \ n @__ ctrl.ID = \「 btnSubmit \「; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 26 \」C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ ctrl.Text = \」Submit \「; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 26 \「C:\ Documents and Settings \ Admin \ My Documents \ Visua l Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ ctrl.Width = new System.Web.UI.WebControls.Unit(150,System.Web.UI.WebControls.UnitType.Pixel); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 26 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n((System.Web.UI.IAttributeAccessor)(@__ ctrl))。SetAttribute(\」style \「,\」top:auto;左:auto \「); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 26 \」C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n((System.Web.UI.IAttributeAccessor)(@__ ctrl))。SetAttribute(\」top \「,\」100px \「); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 26 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ ctrl.Click - = new System.EventHandler(this.btnSubmit_Click); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 26 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \」\ r \ n @__ ctrl.Click + = new System.EventHandler (this.btnSubmit_Click); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n return @__ ctrl; \ r \ n} \ r \ n \ r \ n [System.Diagnostics。 DebuggerNonUserCodeAttribute()] \ r \ n private global :: System.Web.UI.HtmlControls.HtmlTableCell @_ _BuildControl__control10(){\ r \ n global :: System.Web.UI.HtmlControls.HtmlTableCell @__ ctrl; \ r \ n \ r \ n #line 25 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ctrl = new global :: System.Web.UI.HtmlControls.HtmlTableCell(\」td \「); \ r \ n \ r \ n#在線默認\ r \ n #line hidden \ r \ n \ r \ n #line 25 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \ r \ n @__ ctrl.Align = \「center \」; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n System.Web.UI.IParserAccessor @__parser =((System。 Web.UI.IParserAccessor)(@__ ctrl)); \ r \ n \ r \ n #line 25 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ parser.AddParsedSubObject(new System.Web.UI.LiteralControl(\」\ r \ n \「)); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n global :: System.Web.UI.WebControls.Button @__ ctrl1; \ r \ n \ r \ n #line 25 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \」\ r \ n @__ ctrl1 = this。@ __ BuildControlbtnSubmit(); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 25 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__parser。AddParsedSubObject(@__ ctrl1); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 25 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual 2008年工作室\項目\ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \ 「\ r \ n @__ parser.AddParsedSubObject(新System.Web.UI.LiteralControl(\」 \ r \ n \ r \ n \「)); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n return @__ ctrl; \ r \ n} \ r \ n \ r \ n [System.Diagnostics.DebuggerNonUserCodeAttribute()] \ r \ n私人無效@__ BuildControl__control7(System.Web.UI.HtmlControls.HtmlTableCellCollection @__ctrl){\ r \ n全球:: System.Web.UI.HtmlControls.HtmlTableCell @__ CTRL 1; \ r \ n \ r \ n#行17 \」 C:\ Documents和Settings \管理\我的文檔\ Visual Studio 2008的\項目\ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ CTRL 1 =該@ __ BuildControl__control8(); \ r \ n \ r \ n#在線默認\ r \ n #line隱藏\ r \ n \ r \ n #line 17 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileT oSQL \ DataMatch.aspx \「\ r \ n @__ ctrl.Add(@__ ctrl1); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n global :: System.Web.UI .HtmlControls.HtmlTableCell @__ ctrl2; \ r \ n \ r \ n #line 17 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \」\ r \ n @__ ctrl2 = this。@ __ BuildControl__control9(); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 17 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ ctrl.Add(@__ ctrl2); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n global :: System.Web.UI.HtmlControls.HtmlTableCell @__ ctrl3; \ r \ n \ r \ n #line 17 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ ctrl3 = this。@ __ BuildControl__control10(); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n#第17行\「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ ctrl.Add(@__ ctrl3); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n} \ r \ñ\ r \ N [System.Diagnostics.DebuggerNonUserCodeAttribute()] \ r \ n私人全球:: System.Web.UI.HtmlControls.HtmlTableRow @__ BuildControl__control6(){\ r \ n全球::的System.Web.UI .HtmlControls.HtmlTableRow @__ ctrl; \ r \ n \ r \ n #line 17 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \」\ r \ n @__ctrl = new global :: System.Web.UI.HtmlControls.HtmlTableRow(); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 17 \ 「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \」\ r \ n @__ ctrl.Align = \「center \」; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 17 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \ 「\ r \ n this。@ __ BuildControl_ _control7(@__ ctrl.Cells); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n return @__ ctrl; \ r \ n} \ r \ n \ r \ n [System。 Diagnostics.DebuggerNonUserCodeAttribute()] \ r \ n私人全球:: System.Web.UI.WebControls.Literal @__ BuildControllTextData(){\ r \ n全球:: System.Web.UI.WebControls.Literal @__ CTRL; \ r \ \ n \ r \ n #line 34 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \」\ r \ n @__ctrl = new global :: System。 Web.UI.WebControls.Literal(); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n this.lTextData = @__ ctrl; \ r \ n \ r \ n #line 34 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \」\ r \ n @__ ctrl.ID = \「lTextData \」; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n return @__ ctrl; \ r \ n} \ r \ n \ r \ n [System.Diagnostics.DebuggerNonUserCodeAttribute()] \ r \ n private global :: System.Web.UI.WebControls.Panel @__ BuildControlpnlDisplayData(){\ r \ n global: :System.Web.UI.WebControls.Panel @__ ctrl; \ r \ n \ r \ n #line 31 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch。 aspx \「\ r \ n @__ctrl = new global :: System.Web.UI.WebControls.Panel(); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n this。 pnlDisplayData = @__ CTRL; \ r \ n @__ ctrl.ApplyStyleSheetSkin(本); \ r \ n \ r \ n#行31 \「C:\ Documents和Settings \管理員\我的文檔\ Visual Studio 2008的\項目\ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ ctrl.ID = \」pnlDisplayData \「; \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 31 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \」\ r \ n @__ ctrl.Visible = false; \ r \ n \ r \ n#在線默認\ r \ n #line hidden \ r \ n System.Web.UI.IParserAccessor @__parser =((System.Web.UI。IParserAccessor)(@__ ctrl)); \ r \ n \ r \ n #line 31 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \」\ r \ n @__ parser.AddParsedSubObject(new System.Web.UI.LiteralControl(\「\ r \ n \ r \ n \ r \ n \」+ \ r \ n \「\」)); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n global :: System.Web.UI.WebControls.Literal @__ ctrl1; \ r \ n \ r \ n #line 31 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ ctrl1 = this。@ __ BuildControllTextData(); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 31 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \」\ r \ n @__parser。 AddParsedSubObject(@__ ctrl1); \ r \ n \ r \ n #line default \ r \ n #line hidden \ r \ n \ r \ n #line 31 \「C:\ Documents and Settings \ Admin \ My Documents \ Visual Studio 2008 \ Projects \ AddFileToSQL \ AddFileToSQL \ DataMatch.aspx \「\ r \ n @__ parser.AddParsedSubObject(new System.Web.UI.LiteralCont
作爲一個簡單的解決方案,您是否嘗試過使用Response.Redirect? – 2010-04-15 18:26:57
不,但我會試試這個並將結果發回。謝謝。 – salvationishere 2010-04-15 18:29:28
Response.Redirect對我來說不起作用,因爲它會請求一個URL,而我嘗試的URL字符串不起作用。這是我的默認網站應用程序。有什麼問題: Response.Redirect(「http://localhost/WpfApp1/DataMatch.aspx」); 它說沒有找到「/WpfApp1/DataMatch.aspx」。 – salvationishere 2010-04-15 18:37:04