From: Tony WONG on 22 Apr 2010 00:22 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
From: Alexey Smirnov on 22 Apr 2010 02:20 On Apr 22, 6:22 am, "Tony WONG" <x...(a)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;")
From: Tony WONG on 22 Apr 2010 02:45 Thanks a lot.
|
Pages: 1 Prev: Help me solve this problem Next: requesting others ideas/feedback |