Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Postback in asp.net 2.0

Status
Not open for further replies.

mbiro

Programmer
Nov 20, 2001
304
I have a master page in ASP.NET 2.0 and two child pages. The first child is named default.aspx and the second is info.aspx. Default.aspx has a form that posts back to itself, does some stuff, and server.transfers to info.aspx. Info.aspx has another form that posts back to itself. When I step through the code, it goes thru the info.aspx.vb code and then goes through the default.aspx.vb code. Why is it going back through the default.aspx.vb code? Info.aspx.vb makes no reference to it at all. Thanks.
 
Well, we can't see your code or how any requests are being made but at a guess I'd say it's because of the server transfer. This will transfer the server to execute the code from your second page but your user's address will still remain on the first page. Any future request will be made to that original page.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Thank you for the response. I didn't include the code because it really didn't do anything except store values in a database. Here are the developments so far:

If I change the name of the initial page from default.aspx to mydefault.aspx, everything works as normal. Also, if I put a server.transfer on the second page, info.aspx, to a third page and leave the name of the first page default.aspx, everything works as normal.

Any ideas why naming the page default.aspx would cause this behavior? I notice that the partial class is named _default as default is a reserved word.

I viewed the source of the second page, info.aspx, and the action of the form is set to info.aspx, so I don't understand how the server.transfer would cause the behavior.

I should mention that this app was originally written in .net 1.1 and worked fine. There must be something with the partial class _default, I'm guessing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top