By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,011 Members | 1,000 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,011 IT Pros & Developers. It's quick & easy.

hyperlink posts back

P: n/a
Ok this is very odd. I have a hyperlink server control (not a linkbutton)
on my .aspx page. When the navigateurl property is set to a file
(blah.aspx) in the same directory as the current page, the page posts back
BEFORE redirecting to the next page. If I change the navigateurl property
to go to a page in a subfolder (foo\bar.aspx) it does not do a postback.

I swear I'm not messing with it - I did the experiment 3 times in a row ...
once to the same folder, one to a subfolder, one to the same folder, once to
a subfolder, etc., and it did this each time. I confirmed this by putting a
break point on a trivial Response.Write("blah") line in my Page_Load event.
For example, the first line below does NOT postback. The second does. ???

<asp:hyperlink id="HyperLink4" runat="server"
NavigateUrl="somefolder/whatever.aspx">HyperLink Text</asp:hyperlink>
<asp:hyperlink id="HyperLink5" runat="server"
NavigateUrl="blah.aspx">HyperLink Text</asp:hyperlink>

I do NOT want it to postback which is the expected behavior of a hyperlink
server control. Any suggestions?

Thanks in advance!
Mark
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Set the AutoPostBack property to "False" See if that helps. Can you
create the hyperlink dynamically? Try doing it with simple HTMLAnchor
object.

Neil

"Mark" <fi**************@umn.edu> wrote in message news:<OB**************@TK2MSFTNGP11.phx.gbl>...
Ok this is very odd. I have a hyperlink server control (not a linkbutton)
on my .aspx page. When the navigateurl property is set to a file
(blah.aspx) in the same directory as the current page, the page posts back
BEFORE redirecting to the next page. If I change the navigateurl property
to go to a page in a subfolder (foo\bar.aspx) it does not do a postback.

I swear I'm not messing with it - I did the experiment 3 times in a row ...
once to the same folder, one to a subfolder, one to the same folder, once to
a subfolder, etc., and it did this each time. I confirmed this by putting a
break point on a trivial Response.Write("blah") line in my Page_Load event.
For example, the first line below does NOT postback. The second does. ???

<asp:hyperlink id="HyperLink4" runat="server"
NavigateUrl="somefolder/whatever.aspx">HyperLink Text</asp:hyperlink>
<asp:hyperlink id="HyperLink5" runat="server"
NavigateUrl="blah.aspx">HyperLink Text</asp:hyperlink>

I do NOT want it to postback which is the expected behavior of a hyperlink
server control. Any suggestions?

Thanks in advance!
Mark

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.