开发者

Page.ClientScript.RegisterStartupScript is not working when using ajax toolkitscriptmanager control in the page

i am using iscrosspagepostback property in my asp.net page.So for a开发者_StackOverflow button i give both onclick event and postbackurl property.Now when i click the button first it will postback to sam page do some work and then go to next page as specified in the postback url property.

Now my problem is, i have to check the emailexistence functionality on postback.If it(emailexistence() method) returns false then it wont postback to next page.it remains in the same page .But if it returns true ,then it is going to next page.

how to restrict this.


Let me see if I understand the scenario correctly:

  • You're cross posting from page A to page B. You're doing this because you have information on page A that you need on page B.

  • You want to stay on the same page if validation fails.

If that is the situation, then do NOT use crossposting. Just do a regular postback and do a Server.Transfer after you're done with validation.

The problem with cross posting is that you are already on the new page; the redirect occurs on the client side.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜