RapidShare Free Download LinksRapidShare Search
Poll
Question: do javascript for gridveiw (delete) success
yes
no

Pages: [1]
  Print  
Author Topic: javascript c#  (Read 326 times)
October 17, 2009, 02:29:03 AM
Arjun
Newbie
*

Karma: 0
Posts: 1


View Profile
« on: October 17, 2009, 02:29:03 AM »

<script language="c#" runat="server">
 

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
  
{
  
if (e.Row.RowType == DataControlRowType.DataRow)
  
{
      
//suppose you have a link button column
      
LinkButton l = (LinkButton)e.Row.FindControl("LinkButton1");
    
l.Attributes.Add("onclick", "javascript:return confirm('Are you sure you want to delete this record?'");
  
}
 
}
</script>



  
Logged
Pages: [1]
  Print  
 
Jump to:  

Your Ad Here
Powered by SMF | SMF © 2006-2009, Simple Machines LLC ">

Custom Search
Privacy Statement