Java script in c#
-
Hi I want to reload a page with a button. The page I wish to reload lies in an i frame, the button that I wish to use to reload lies in another i frame. I have this code in the *.aspx file and it works. The code lies behind a link, and I wish to have it behind a button. href="javascript:location.reload()" target="sub_top" can I use this code in code-behind? how do I do this? Thanks! -- Evil geniuses for a better tomorrow --
-
Hi I want to reload a page with a button. The page I wish to reload lies in an i frame, the button that I wish to use to reload lies in another i frame. I have this code in the *.aspx file and it works. The code lies behind a link, and I wish to have it behind a button. href="javascript:location.reload()" target="sub_top" can I use this code in code-behind? how do I do this? Thanks! -- Evil geniuses for a better tomorrow --
No, you can't use that code in the code-behind. Since the code-behind will regenerate the entire HTML page anyway, you'll just end up loading the entire frameset. You're better off putting that code in the
onclick
handler of a button. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome