I have a bunch of divs on my page that are added at run time dynamically. When any of the dynamically added divs are clicked - All need to call the same function in my code
I'm not used to write VB code so my example is in C# but maybe it can help you get started. It's probably not the cleanest way to implement this, but i'll give it a try:
HTML
Client
Server
private void Page_Load(object sender, EventArgs e)
{
var arg = Request.Form["__EVENTTARGET"]; 'this will be empty on your first page request, but if the user click a div it will cause a postback to server, so this event will be fired again and will contain the div ID.
if(arg != null)
{
string divID = (string)arg;
'call your method with the argument.
}
}
More information about this can be found here:
http://wiki.asp.net/page.aspx/1082/dopostback-function/