Call a Link in C#

  • Thread starter Thread starter John
  • Start date Start date
J

John

HI,

I have a stupid beginners-question:

How can I call a Link into another Frame (not
response.redirect) in a Button_click event on Server side
in C#?
I know, I need a target and stuff, but how do I CALL the
Link?

PLEASE?????
 
Okay, I'm having a bit of trouble understanding you due to my ultra-literal
programmer's mind, but I think I have an idea. So, let me begin by stating
your problem in my own words, and then give you the answer to the question
as I interpret it.

It sounds like you want to change the location property of another frame in
a frameset (load a different URL/page into it) from the server-side Click
event of a Button Server Control. Am I correct so far? If so, you can use
the Event Handler to add a Startup Script to the page, which will do this.
Something like:

string strScript = "<script
type=\"text/javascript\">parent.otherframename.location =
\"somepage.aspx\";</script>"
if (!Page.IsStartupScriptRegistered("MyScript")
Page.RegisterStartupScript("MyScript", strScript);

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.
 
Thanks.

But you didn't really hit the Point!
Perhaps I am just too complicated (or silly)!

All I need to now is:

How do I CALL A LINK on Server side????????

I only know parameters the second I hit the Button (or
even later, because I have to calculate them.

Something like Response.Redirect(url) but for another
Frame (or Window, or what so ever).
 
John, that's what I told you how to do in my last message:
It sounds like you want to change the location property of another frame in
a frameset (load a different URL/page into it) from the server-side Click
event of a Button Server Control. Am I correct so far? If so, you can use
the Event Handler to add a Startup Script to the page, which will do this.
Something like:
string strScript = "<script
type=\"text/javascript\">parent.otherframename.location =
\"somepage.aspx\";</script>"
if (!Page.IsStartupScriptRegistered("MyScript")
Page.RegisterStartupScript("MyScript", strScript);

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.
 
Back
Top