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

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,222
Latest member
patricajohnson51

Latest Threads

Top