Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Conditional Validation
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00895521
Message ID:
00898100
Views:
21
Hi Cathi,

Yes the issue has been resolved but I appreciate the input. Yes, that is a good method that I have also used for detecting problems of this sort and is how I determined that the script was not being written to the page for the control in this case.

It's funny, I've used the programmatic method to write the necessary script for controls before. After some time passes however, things like this just seem to slip from memory ... probably my "age" telling on me. LOL

Bill

>Hi Bill,
>
>It sounds like you solved your problem but I just wanted to state that when I have problems figuring out the correct javascript syntax for hooking up a client-side function to an event, I use the code-behind approach. Then I "View Source" in the browser to see how the code was written to the page.
>
>>Hi David,
>>
>>Yeah, hadn't thought of adding it in programmatically. I'll give that a try and see how it works.
>>
>>Many thanks,
>>Bill
>>
>>>Try
>>>
>>>btnSubmit.Attributes.Add("onclick", "btnOnClick();")
>>>
>>>or in C# I think its
>>>
>>>btnSubmit["onclick"] = "btnOnClick();";
>>>
>>>This is for asp.net controls. HTML controls work as you would expect.
>>>
>>>>Hi Hector,
>>>>
>>>>Know how to find out how to do this? :-) When I try to implement the button's client side "OnClick" event, E.g.
>>>>
<asp:button id="btnSubmit" OnClick="javascript:btnOnClick()" runat="server" Font-Size="X-Small" Font-Names="Arial" Text="Submit"></asp:button>
>>>>ASP.NET squeals like a stuck pig.
>>>>
>>>>Bill
>>>>
>>>>>I *think* you could have each button call a different (client side) JavaScript function. Inside each function you'll do whatever validations you need and then call document.myform.submit to actually post the form the web server.
>>>>>
>>>>>I say "I think" because I have never done this, I've only seen/heard examples that mention this. Hope this helps.
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Reply
Map
View

Click here to load this message in the networking platform