Client-Side Button

G

Guadala Harry

All of my ASP.NET programming to date involving buttons required server-side
processing. But now I need for a button to simply open another window and I
don't want to use a server control for this simple task. This is what I came
up with. Is this a standard way to accomplish the objective? Is there a
better way?

<input type="button" id="btnTest" value="Click Me"
onClick="window.open('OtherPage.aspx', '_parent')" class="buttonStyle">

Thanks!
 
J

Jeffrey Palermo [MCP]

Guadala,
Yes, that is a very good way to do it!! That functionality doesn't need
ASP.NET at all. This is simply html and javascript running on the client.
When server-side functionality is not required, you are wise to use
client-side functionality like this.

Best regards,
Jeffrey Palermo
 

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

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top