Showing posts with label url. Show all posts
Showing posts with label url. Show all posts

Saturday, March 24, 2012

Load another url without postback

How can i load another url without postback using a hyperlink?

Set theNavigateUrlproperty

<asp:HyperLinkID="HyperLink1"NavigateUrl="~/ViewFiles.aspx"runat="server">HyperLink</asp:HyperLink>


yes i know navigateurl but i mean without refreshing to page .
Navigate URL property won't create a postback. To check this have a Break Point in Page_Load and try clicking the hyperlink.Your page_Load won't trigger
AshokRaja eisai vlakas
Ontws tragiko... Kai fantasou oti o tipos exei apanthsei kai se allous...

load external url in page?

I have a treeView that lists SQL Reports available to the user. What I'd like to do is put the treeView into an Update Panel, and some other control that can display an external url, next to the treeView so that when a user clicks on a report, it fetches the contents of the url and displays it without doing a postback. So my question is, are there samples of this out there (I couldn't find any) and if so, what control would allow me to load external content into it (like an iframe)? I realize I could do the same thing with a div or iframe using javascript, but I'd like to use ajax if possible...

Thanks!

eddie

Chao,

I would put the iframe inside the UpdatePanel and the Trigger controling the URL's ID from the treeview. This is similar to having a gridview or any view inside an UpdatePanel with a trigger controlling a button. The button is of course outside the UpdatePanel.

WS

p.s. not responsible for not working ... hihihi ... but that's how i see it.