Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works

ASP.NET, calling vb.net sub on onclick

  • Please log in to reply



    New Member

  • Member
  • Pip
  • 1 posts
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

This Works
Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
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)
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.

  • 0


Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP