I'm new here and would like some help to solve my problem.
I'm working in ASP.net with Vb.net
What i want, and i'm trying to do, is to add onclick attribute to tablecell
It is working if i call on onclick an event functin, like Linkbutton1. But if i call a sub made by me isn't working
Example.
This Works
Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
label1.text="a"
End Sub
Table Cell calling linkbutton1 function
tc.Attributes.Add(("onclick"), ("java script:__doPostBack('LinkButton1','')"))
------------------------------------------------------
This is what i want, but don't work
Public sub teste(byval x as string)
label1.text=x
end sub
tc.Attributes.Add(("onclick"), ("teste(1)"))
PS (if help):i want to pass in parameter one variable who receives id from database
If you can help me i would thank you
Hope you understood my problem
Edited by Palk, 01 March 2008 - 02:23 PM.