navigation?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've got a newbie question. I'm new to ASP.Net and have a control that
someone else wrote that produces the following:

<td style="white-space:nowrap;"><input type="image" name="ctl00$btnSystem"
id="ctl00_btnSystem" src="../images/btnShortcutSystemOn.gif"
style="border-width:0px;" /></td>

If I want someone to be able to click on that image and take them to another
page, how's the best way to do that? Redirection? How specifically. I'm
new to .Net.

I figure I'll have to write a handler that handles ctl00_btnSystem.click.
Is this correct? And what do I put inside the handler to take the browser to
the new page?
 
Hockeyfan.

Are you using Visual Studio Net and code behind.

Than in the clickevent of that image which you have to set

Response.Redirect("~/default.aspx")

Be aware that you better can use an image button for this.

I hope this helps,

Cor
 
HockeyFan said:
I've got a newbie question. I'm new to ASP.Net and have a control
that someone else wrote that produces the following:

<td style="white-space:nowrap;"><input type="image"
name="ctl00$btnSystem" id="ctl00_btnSystem"
src="../images/btnShortcutSystemOn.gif" style="border-width:0px;"
/></td>

If I want someone to be able to click on that image and take them to
another page, how's the best way to do that? Redirection? How
specifically. I'm new to .Net.

As it's an <input>, it must be on a <form>. Do you want the form's action to
be processed, or are you trying to do
<a href="somewhere.html"><img src="../images/btnShortcutSystemOn.gif"
border="0"></a>

?

Andrew
 
HockeyFan said:
I've got a newbie question. I'm new to ASP.Net and have a control
that someone else wrote that produces the following:

<td style="white-space:nowrap;"><input type="image"
name="ctl00$btnSystem" id="ctl00_btnSystem"
src="../images/btnShortcutSystemOn.gif"
style="border-width:0px;" /></td>

If I want someone to be able to click on that image and take them to
another page, how's the best way to do that? Redirection? How
specifically. I'm new to .Net.

I figure I'll have to write a handler that handles
ctl00_btnSystem.click. Is this correct? And what do I put inside
the handler to take the browser to the new page?


I know VB.Net pretty good, but I know nothing about ASP.Net. Maybe you
should post to one of the ASP.Net groups:

microsoft.public.dotnet.framework.aspnet[.*]


Armin
 
Armin,

Why
microsoft.public.dotnet.framework.aspnet[.*]

This can be done pretty good with VB.Net code, as it can be done by other
code as well.

The solution given in the newsgroup ASPNET will most likely not be the same
as in VB.Net

Which depends if Visual Studio Net is used.

Cor
 
Back
Top