Click here to Skip to main content
15,891,976 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
i have a gridview in RowDataBound in cell[1] i show:
click me
and i define:
C#
protected void btnShowData(object sender, EventArgs e)
    {
        lblmessage.Text = "hello worla";
    }

but in run time when i click on "click me" i get this message:
Microsoft JScript runtime error: 'btnShowData' is undefined

plz help me ,how can i use "a" tag by onclick event?

thanks.
Posted
Comments
Prerak Patel 19-Nov-11 2:21am    
Not clear. Share more relevant code.

Not sure why you have link of same question in your Question-Description.

You should learn "TemplateColumn" of Asp.Net GridView.

Have a look at below Article.

http://msdn.microsoft.com/en-us/magazine/cc301573.aspx

Once you understand the concept, then you will be able to customize your Asp.Net GridView in many ways.
 
Share this answer
 
Comments
zinajoonjooni 19-Nov-11 2:36am    
i must use "a" tag plz answer me how can i use "a" tag by onclick event?
thanks
thatraja 19-Nov-11 4:24am    
Check my answer.
thatraja 19-Nov-11 4:24am    
/*Not sure why you have link of same question in your Question-Description.*/
I think he just created a dummy anchor tag for the question, like this Dummy link in Gridview

Anyway Take a 5!
zinajoonjooni 23-Nov-11 0:54am    
thanks a lot
RaisKazi 23-Nov-11 4:43am    
Please accept answer by "Accept Answer"(green) Button, if your problem got resolved.
 
Share this answer
 
Comments
zinajoonjooni 23-Nov-11 0:55am    
thanks a lot

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900