RapidShare Free Download LinksRapidShare Search
GovernmentAuctions.org Free Trial Membership
$7 Off Coupon: 10 Days Access for only $2.95!
Anastasia Dating Service
Poll
Question: do javascript for gridveiw (delete) success
yes
no

Pages: [1]
  Print  
Author Topic: javascript c#  (Read 416 times)
October 16, 2009, 07:29:03 PM
Arjun
Newbie
*

Karma: 0
Posts: 1


View Profile
« on: October 16, 2009, 07:29:03 PM »

<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:  

GovernmentAuctions.org Free Trial Membership
$7 Off Coupon: 10 Days Access for only $2.95!
Anastasia Dating Service
Powered by SMF | SMF © 2006-2009, Simple Machines LLC ">

Custom Search
Privacy Statement