Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > open link from button

Reply
Thread Tools

open link from button

 
 
=?Utf-8?B?SnVsaWE=?=
Guest
Posts: n/a
 
      11-20-2006
Hi

I have a webcontrol.button on a asp.net page. When the user clicks the
button I would like to dynamically build a link with values from the config
file and then open this link.

I know how to build the link but I dont know how I open the link from the
*.cs file?

Thanks
J
 
Reply With Quote
 
 
 
 
John Timney \(MVP\)
Guest
Posts: n/a
 
      11-20-2006
Look at the RegisterClientScriptBlock method (deprecated in 2.0). It will
show you how to tie client side javascript code into your application.

http://msdn2.microsoft.com/en-us/lib...riptblock.aspx

All you really need to do is use the javascript openwindow method and pass
it the URL you have constructed as one of its arguments.

--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog


"Julia" <> wrote in message
news:63201CEC-5D9D-4188-B32C-...
> Hi
>
> I have a webcontrol.button on a asp.net page. When the user clicks the
> button I would like to dynamically build a link with values from the
> config
> file and then open this link.
>
> I know how to build the link but I dont know how I open the link from the
> *.cs file?
>
> Thanks
> J



 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      11-20-2006
Once you have the url, you can call either Server.Transfer or
Response.Redirect methods to navigate the current browser window to the new
url. Are you happy with this or you need to open another browser window?

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]


"Julia" <> wrote in message
news:63201CEC-5D9D-4188-B32C-...
> Hi
>
> I have a webcontrol.button on a asp.net page. When the user clicks the
> button I would like to dynamically build a link with values from the
> config
> file and then open this link.
>
> I know how to build the link but I dont know how I open the link from the
> *.cs file?
>
> Thanks
> J



 
Reply With Quote
 
Mark Rae
Guest
Posts: n/a
 
      11-20-2006
"John Timney (MVP)" <> wrote in message
news:. uk...

> Look at the RegisterClientScriptBlock method (deprecated in 2.0).


Only deprecated as a member of the Page class - now exists in the
ClientScript class, which is the currently recommended usage...


 
Reply With Quote
 
John Timney \(MVP\)
Guest
Posts: n/a
 
      11-20-2006
gakk..........that would be right Mark! Well spotted!

--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog


"Mark Rae" <> wrote in message
news:%23Ejw%...
> "John Timney (MVP)" <> wrote in message
> news:. uk...
>
>> Look at the RegisterClientScriptBlock method (deprecated in 2.0).

>
> Only deprecated as a member of the Page class - now exists in the
> ClientScript class, which is the currently recommended usage...
>



 
Reply With Quote
 
Mark Rae
Guest
Posts: n/a
 
      11-20-2006
"John Timney (MVP)" <> wrote in message
news:wdGdnVe6XOzIDPzYnZ2dnUVZ8q-...

> gakk..........that would be right Mark! Well spotted!


Everybody, after three...

"Tell me why I don't like Mondays..."




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: Link Link Link =?Utf-8?B?REw=?= Windows 64bit 0 05-17-2005 12:15 PM
Re: Link Link Link DANGER WILL ROBINSON!!! Kevin Spencer ASP .Net 0 05-17-2005 10:41 AM
Problems with Link Button and Button web controls Suzanne ASP .Net Web Controls 0 12-03-2003 02:17 PM
How do I Open / Close a window in either using a link or button Server Controls. Srik ASP .Net 3 11-17-2003 12:05 PM
on click of a link button should first save the data and then open a new browser Mathew George ASP .Net 1 07-02-2003 12:48 PM



Advertisments