Call a Link in C#

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?????
 
K

Kevin Spencer

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.
 
J

John

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).
 
K

Kevin Spencer

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,144
Latest member
KetoBaseReviews
Top