Post back when one clicks

P

pamelafluente

I have a simple form with 1 DIV:

<form id="form1" runat="server">
<div>
<div id="MyDiv" style="width: 94px; height: 22px" onmousedown
= "What??">
This is my div</div>
</div>
</form>

and the following simple code (behind):

Partial Class _Default
Inherits System.Web.UI.Page

Sub MouseClicked(ByVal ID As String)
Response.Write("Was clicked the div " & ID)
End Sub

End Class

I want that when the user clicks on the DIV there is a postback and
the function MouseClicked(ByVal ID As String) is executed responding
the ID of the DIV. Can anyone show me how to do this simple thing ?

Do I have to use session variables??

Thank you.

Pam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top