Hi,
I am new to Ajax. can any one tel me .
is it possible to redirect to another page with out postbacking?
if it is possible will u please tel me the steps to do redirect without postbacking.
Its posible through certain control which has postback url or navigate url as its property.
Have a look into these controls
<asp:LinkButtonID="LinkButton1"PostBackUrl="~/T1.aspx"runat="server">LinkButton</asp:LinkButton><asp:ButtonID="Button1"PostBackUrl="~/t1.aspx"runat="server"Text="Button"/><asp:HyperLinkID="HyperLink1"NavigateUrl="~/T1.aspx"runat="server">HyperLink</asp:HyperLink>Hope this will help
A postback is bound to take place as you would be loading a new page, so it is not possible at the first place.
However there is trick which you can use for a better user experience, mind you it would not avoid the postback but it would not cause any flicker in your screen. You can place these two tags at the head of your HTML dcocument..
<META http-equiv="Page-Enter" content="blendTrans(Duration=0.2)">
<META http-equiv="Page-Exit" content="blendTrans(Duration=0.2)">
You can also refer to the following link for the pros and cons of this...
http://secretgeek.net/fajax.asp
Hope this could be of some use to you
Cheers
Ritesh
This tag
<META http-equiv="Page-Enter" content="blendTrans(Duration=0.2)">
<META http-equiv="Page-Exit" content="blendTrans(Duration=0.2)">
working perfectly...
One thing you guys have missed out.
If the question is correct the above two solutions are wrong.
The question is postback should not happen.
Try this scenario
Have a Button and linkbutton. In the link button set the navigateurl to some file and in button click set respone.redirect to some page.
Now place the meta tag mentioned above.
have a line break in page load. Check which control makes the navigation without postback.
Even if you place the meta tag postback will happen in button click.
and also the following will work for only ie not for other browsers
<META http-equiv="Page-Enter" content="blendTrans(Duration=0.2)">
<META http-equiv="Page-Exit" content="blendTrans(Duration=0.2)">
0 件のコメント:
コメントを投稿