By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,660 Members | 1,593 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,660 IT Pros & Developers. It's quick & easy.

How to link ASP sub in clickevent of td element

P: n/a
<script runat"Server">
public sub LogOut1()
end sub

In td element

<td onclick="LogOut1()>
<a Log Out>

it is giving error when i click the td element in browser.
Oct 6 '10 #1
Share this Question
Share on Google+
1 Reply

Expert 2.5K+
P: 3,405
OK, first lesson in ASP:

The ASP script RUNS ON THE SERVER. It is not sent to the browser. THERE IS NO WAY TO LINK A CLICK EVENT TO AN ASP FUNCTION. It cannot be done. This would be like ordering food from a restaurant, taking it home, putting a bite in your mouth, and then saying, "Waiter, please have the chef remove the peas." You are not at the restaurant anymore, it is too late to have the chef change the order. Stop trying to do it, the only one who can get that to work is Chuck Norris.

If you explain what you are trying to do, maybe we could suggest an alternative approach.

Oct 6 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.