Where can I view and edit automatically generated html code
-
When i view the html code of my .aspx file in VS the automatically created code (for example when calling Page.GetPostBackEventReference in the code behind file) isn't shown. A browser on a client, which views the website can of course show the whole html code. So where can I view and edit this automatically generated code? Thanks again.
-
When i view the html code of my .aspx file in VS the automatically created code (for example when calling Page.GetPostBackEventReference in the code behind file) isn't shown. A browser on a client, which views the website can of course show the whole html code. So where can I view and edit this automatically generated code? Thanks again.
When you create your page you're in design view, below are two buttons, design and html. Press html for the code. For the real html which a client views, you can't. You don't know what data the client requiested. The page is dynamically built when the client requested data. hope this helps. No hurries, no worries.
-
When you create your page you're in design view, below are two buttons, design and html. Press html for the code. For the real html which a client views, you can't. You don't know what data the client requiested. The page is dynamically built when the client requested data. hope this helps. No hurries, no worries.
Ok, to be more specific: To try something out I used the Page.GetPostBackEventReference, which generates html code (Page.GetPostBackEventReference. Now I removed Page.GetPostBackEventReference from my code, but of course the changes in html are still there and can't be viewed in the html view of my .aspx file. How can I remove the automatically added code?
-
Ok, to be more specific: To try something out I used the Page.GetPostBackEventReference, which generates html code (Page.GetPostBackEventReference. Now I removed Page.GetPostBackEventReference from my code, but of course the changes in html are still there and can't be viewed in the html view of my .aspx file. How can I remove the automatically added code?
-
When i view the html code of my .aspx file in VS the automatically created code (for example when calling Page.GetPostBackEventReference in the code behind file) isn't shown. A browser on a client, which views the website can of course show the whole html code. So where can I view and edit this automatically generated code? Thanks again.
Ok, to be more specific: To try something out I used the Page.GetPostBackEventReference, which generates html code (Page.GetPostBackEventReference). Now I removed Page.GetPostBackEventReference from my code, but of course the changes in html are still there and can't be viewed in the html view of my .aspx file. How can I remove the automatically added code? I really don't know what to do now. Even creating a new webproject and manually copy the code into the new files doesn't work. The html code is still extended. The old project code is somehow recognized and asp.net adds the code Page.GetPostBackEventReference created, which I don't want to have in my html code. All other projects work fine and aren't extended. Please help me, this problem is really annoying. Thanks.
-
Ok, to be more specific: To try something out I used the Page.GetPostBackEventReference, which generates html code (Page.GetPostBackEventReference). Now I removed Page.GetPostBackEventReference from my code, but of course the changes in html are still there and can't be viewed in the html view of my .aspx file. How can I remove the automatically added code? I really don't know what to do now. Even creating a new webproject and manually copy the code into the new files doesn't work. The html code is still extended. The old project code is somehow recognized and asp.net adds the code Page.GetPostBackEventReference created, which I don't want to have in my html code. All other projects work fine and aren't extended. Please help me, this problem is really annoying. Thanks.
Hi there, There are two things come to mind that you might need to check: + Make sure that the web control assembly referenced by your web application is the new one after you take out the
Page.GetPostBackEventReference
stuff in your control and recompile the project. + Are there any other controls declared in your web page such asDropDownList
,HtmlButton
...? Basically, the__doPostBack
function is automatically added by the ASP.NET in the privateRenderPostBackScript
method when there is a control declared in the webpage that requires post back client script like ListControl(DropDownList, ListBox), LinkButton ... You can try with a simple web page which basically contains only your custom control and see the result.