Weird behavior using MasterPage and PostBackUrl

Joined
Oct 31, 2006
Messages
1
Reaction score
0
Hello,

I was researching if I would be able to do a quick search using an UrlPostback from a MasterPage and I came across an odd behavior.
My master page contains a textbox and an asp.net button with postbackurl to a results page
Then I added the code below every page including the search results page which use the master page:

protected void Page_Load(object sender, EventArgs e)
{
if (this.IsPostBack) { }
}

I added this code so I can add a breakpoint in the if statement.

I notice that no matter which page I was in and I clicked on the asp.net button with the postbackurl. ASP.NET would post to the current page I was in and then it would also post to the page the postbackurl was directed to go. (Noticed this because of the breakpoints in the if statements)

Is this ASP.NET normal behavior (Doesn’t not make sense)? Anyone, has come across this problem? Am I missing something?
I really doubt this is the issue but I’m using VS SP Beta 1. If someone can try it that does not have the VS SP Beta 1 and let me know the results. I’ll be grateful.

Thank you in advance.

H
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top