call a server side function from javascript function

hello i have apage that is contained in MasterPage (contents)

i have a HyperLink and i want to call a serverside function

is it possible?

i am writing C#

nirniron


If i helped you please mark as answered..
0 nirniron 3/25/2008 3:07:14 PM

in your page_load event, you can reference controls on the masterpage by

MasterPage.FindControl("....")

 


Peter Kellner
7 and blogging at
http://PeterKellner.net
MVP, ASP.NET
0 pkellner 3/25/2008 3:09:04 PM

 Use the "LinkButton" control...  Looks the same as a hyperlink, acts the same, and you can catch events from it.

0 Zappke 3/25/2008 3:14:27 PM

no...

ok this is the scenario...

i have a textbox that you could enter date.

if the date is not valid so a validator is raised.

and when i want to click a button that has to clear all fields so the validator dose not let me submit.

SO that is why i want to change the button to hyperlink and call the js function and from the JS function call server side func

i know this is a mess but any solution is welcome.

nirniron


If i helped you please mark as answered..
0 nirniron 3/25/2008 3:27:18 PM

 If you want a button NOT to execute your validators, you can just set "CauseValidation" to false.  If you then click your button, it will ignore validators even if they would normally interrupt your program.

0 Zappke 3/25/2008 3:47:48 PM
thanks nirniron
If i helped you please mark as answered..
0 nirniron 3/26/2008 5:51:40 AM
Reply:

(Thread closed)