Showing posts with label standard. Show all posts
Showing posts with label standard. Show all posts

Thursday, March 29, 2012

Set Button : autopostback to be false

The standard button is set its autopostback property to be true, am I right
?
How can I change it to be false ?
I tried this...
<td><asp:Button id="cmd1" ... autopostback="false"/></td>
But it failed. Why?
ThxThat's what you get when you use a server-side control - when it's clicked
it will post back to the server. If you don't want a postback then simply
use a <input type=button>.
-Brock
DevelopMentor
http://staff.develop.com/ballen

> The standard button is set its autopostback property to be true, am I
> right
> ?
> How can I change it to be false ?
> I tried this...
> <td><asp:Button id="cmd1" ... autopostback="false"/></td>
> But it failed. Why?
> Thx
>

Set Button : autopostback to be false

The standard button is set its autopostback property to be true, am I right
?
How can I change it to be false ?
I tried this...
<td><asp:Button id="cmd1" ... autopostback="false"/></td>
But it failed. Why?

ThxThat's what you get when you use a server-side control - when it's clicked
it will post back to the server. If you don't want a postback then simply
use a <input type=button>.

-Brock
DevelopMentor
http://staff.develop.com/ballen

> The standard button is set its autopostback property to be true, am I
> right
> ?
> How can I change it to be false ?
> I tried this...
> <td><asp:Button id="cmd1" ... autopostback="false"/></td>
> But it failed. Why?
> Thx

Monday, March 26, 2012

Set Focus

When i load a form and the user selects an item from a dropdown list i want to set focus to another control. In standard vb and standard vb.net i can do this. Anyone know how to do this asp.net?... any help would be greatly appreciated

Thank youYou need to add some clientside JavaScript code in the form of an onchange event handler.
OTTOMH, something like:

DDL.attributes.add("onchange","document.getElementById('controlId').focus()")