Sign in to follow this  

[.net] .NET/C#/webforms: updating two frames simultaneously ?

This topic is 4275 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, i'm facing a problem, which shouldn't be one, usually (erm...at least, with such modern tool like C#/.net; i think?): i have a standard frameset for my application; on the left side is the navigation, in the mainframe the content; when the user clicks on a button (no link button!) i need to update both frames, navigation and mainframe, with another .ASPX-page. I have seen the "Response.Redirect()" function, but this function redirects only the current frame (i have tried to get on by using "Response.RedirectLocation", but it seems it has no effect?) Is there any chance of achieving this effect ?

Share this post


Link to post
Share on other sites
Maybe with javascript?

Don't you just love how infuriating it is to go from programming regular Win32 apps with control over everything to programming web pages? Makes you want to eat broken glass.

Share this post


Link to post
Share on other sites
you'll probably need some javascript to do that. In your ASP.NET Page_Load, you can assign javascript to a button with the Attributes property:

Button1.Attrubtes["onclick"] = "otherFrame.href='http://www.google.com'";


Share this post


Link to post
Share on other sites
hi;

having suspended this project for the last few month, today i tried out the informations:

call me dump or whatever, but i can't get it working:


MyButton.Attributes["onclick"] = "MainFrame.href='http://www.google.com'";

MyButton is a type of WebControls.Hyperlink; the above line of code is placed in Page_Load(). (the name of the frame is correct)

when changing the type of MyButton to WebControls.LinkButton, it has also no effect. additionally, i changed the type of MyButton to WebControls.Button; but it's not working, too.

the hint brought in by AnonymousPoster has also no effect.

regardless, what i do - it's just updating the frame where the button is placed in.

writing all this web application stuff is really frustrating... :-(

Share this post


Link to post
Share on other sites

This topic is 4275 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this