PC Review


Reply
Thread Tools Rate Thread

change button type from "submit" to "button"

 
 
Tony WONG
Guest
Posts: n/a
 
      22nd Apr 2010
the button is created at runtime

the button is used as "select all checkbox" in gridview by javascript

Dim lc As New Button
lc.Text = "Select All"
lc.Attributes.Add("onclick", "SelectAll('" & GridViewID & "');")
container.Controls.Add(lc)

when the button is clicked, it run javascript "but then submit".

how can i change the button type from "submit" to "button"

so that it can only run the javascript.

Thanks.

tony


 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      22nd Apr 2010
On Apr 22, 6:22*am, "Tony WONG" <x...@netvigator.com> wrote:
> the button is created at runtime
>
> the button is used as "select all checkbox" in gridview by javascript
>
> * * Dim lc As New Button
> * * lc.Text = "Select All"
> * * lc.Attributes.Add("onclick", "SelectAll('" & GridViewID & "');")
> * * container.Controls.Add(lc)
>
> when the button is clicked, it run javascript "but then submit".
>
> how can i change the button type from "submit" to "button"
>
> so that it can only run the javascript.
>
> Thanks.
>
> tony


lc.Attributes.Add("onclick", "SelectAll('" & GridViewID & "');return
false;")
 
Reply With Quote
 
Tony WONG
Guest
Posts: n/a
 
      22nd Apr 2010
Thanks a lot.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Put "Delete" button separate from "Save and Close" button on Conta adamowolf Microsoft Outlook Contacts 11 10th Feb 2010 03:06 PM
"Save Record" button not working after adding "Edit" button. Viken Karaguesian Microsoft Access 2 31st May 2006 02:30 AM
"News" button missing from the "Go" menu & from the "add button" l =?Utf-8?B?cmdvcmRvbg==?= Microsoft Outlook Discussion 1 23rd Mar 2006 10:17 AM
How can I link a "Submit" button to a "Thank you" page? =?Utf-8?B?RnJpZW5kbHkgTmVpZ2hib3I=?= Microsoft Frontpage 2 24th Oct 2005 03:33 PM
<input id="iPhoto" type="file" size="20" runat="server"> Mark Sandfox Microsoft ASP .NET 1 11th May 2004 02:58 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:14 AM.