,
Share with your friends 

In Firefox Grid Event fires twice

0 ratings Views 259 
Author: krish (krishna kumar)  View Profile |  View other solutions by this author

Question / Problem


In Firefox Gridevent RowCommand fires twice

Solution

This is the issue with .net itself.

Alternative
          When using ButtonField column with the type Image in Gridview user face the problem.
  1. If we use button or Link the event fires only once
  2. Use template column

Workaround

Change the button type to Link then in the Text propery add give img tag and give the image url what you want. this act like similar to image button

Old Code
<asp:ButtonField ButtonType="Image" ImageUrl="~/Img/view.png"  CommandName="_View" HeaderText="View"   />

New Code
            <asp:ButtonField ButtonType="Link"  Text="<img src='../Img/view.png' alt='View'title='View'  border='0'/>"  CommandName="_View" HeaderText="View"  HeaderStyle-CssClass="hdrCmd"  />

Applies to

ASP.Net 3.5 ,Asp.Net 2.0

Rank It

Login to rank it

Report


Advertisement