windows.open from a webbutton

F

Fabiano

Please,

there's any way i can from a WebButton execute windows.open Javascript
command?

I tryied everything but it aways do a postback.

Tks,

Fabiano
 
J

Jeffrey Palermo [MCP]

Fabiano,
Don't always use <asp:Button/>. This will always render an <input
type="submit">. User the Html controls instead. If all you want is
javascript, then don't use a server control. Just <input type="button"
value="Open Window" onclick="javascript:window.open(. . .)>

Regards,
Jeffrey Palermo
 
F

Fabiano

Is there a way i can change dinamically the value property of this HTML
Button, from inside my Code Behind? Or just inline commands?

tks

Fabiano
 
J

Jeffrey Palermo [MCP]

Fabiano,
Yes, you can make any html control a server control by adding and ID and
runat="server".

Then in code-behind, it's an HtmlInputButton object. In the designer you
can right-click any html control and select run as server control, and
VS.NET will make this variable for you.

Jeffrey Palermo

Fabiano said:
Is there a way i can change dinamically the value property of this HTML
Button, from inside my Code Behind? Or just inline commands?

tks

Fabiano


"Jeffrey Palermo [MCP]" <http://dotnetjunkies.com/weblog/jpalermo> escreveu
na mensagem news:[email protected]...
Fabiano,
Don't always use <asp:Button/>. This will always render an <input
type="submit">. User the Html controls instead. If all you want is
javascript, then don't use a server control. Just <input type="button"
value="Open Window" onclick="javascript:window.open(. . .)>

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

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top