Plz help

Posted by Shivanichhabra4u under ASP.NET on 2/18/2009 | Views : 1271 | Status : [Member] | Replies : 3
Hello,

I have written below, in this i have added onserverclick function. This code does not work if the javascript is off, it means if javascript is off it does not call ExitDialogue function.

<a runat="server" onserverclick="ExitDialogue" target="_self">
<img align="absmiddle" border="0" src="calendar.gif" alt="Exit" /></a>

Please help me out very urgent




Responses

Posted by: Neeks on: 2/18/2009 [Member] Bronze

Up
0
Down
You can use .Net Link button instead of href tag.

<asp:LinkButton runat="server" OnClick="ExitDialogue"></asp:LinkButton>

And write the code in the .cs or .vb file

protected void ExitDialogue(object sender, EventArgs e)

{
Response.Write("Hi");
}



Shivanichhabra4u, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Majith on: 2/18/2009 [Member] Starter

Up
0
Down
Hi ,

Test.aspx

<a href="~voice.aspx" onserverclick="test" runat="server">Link test</a>

Test.aspx.cs


public void test(object sender, EventArgs e)
{
Response.Write("Hi Map");
}

try this code ..



Shivanichhabra4u, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Shivanichhabra4u on: 2/23/2009 [Member] Starter

Up
0
Down
Hi Majith,

I have tried the method as u said. But it is not calling server side function if javascript is off.

Plz help.

Shivanichhabra4u, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response