.NET ASP: Event Triggering

liunx

Guest
Hey guys,

I'm starting some projects with .NET and i'm still trying to get familiar with some of their controls.

I want to know, with all the client-side controls, are they just as poweful as regular client side scripting? e.g. through javascript

One thing i can't seem to do right now, if i have an HTML DropDownList control, i want it to trigger a function upon change. The attribute i see is OnSelectedIndexChanged... but it only seems to do anything upon serverside interaction, like with a submit or something. Is there a way to make it trigger upon change? Like a regular HTML dropdown has an attribute to do that... the only way i can seem to do it now is to use a button and its onClick.

any help would be great, especially an explanation of the differing abilities of .NET web controls in terms of client side abilityWell anyway i found a nice resource which kind of tackles these issues, especially understanding the difference in the ASP model vs the ASP.NET one.

<!-- m --><a class="postlink" href="http://www.takempis.com/aspnet_fundamentals.asp#ASPNet_and_Events">http://www.takempis.com/aspnet_fundamen ... and_Events</a><!-- m -->

in the end i'm just using serverside functions, and you can just set the AutoPostBack attribute to true for controls to automatically fire eventsYou can assign scripts by adding attributes to the control dynamically.

Otherwise it posts back to server. You can do almost anything but I would use a bit of Javascript client side, then use some custom checking on the server for further validation.....

You will see more and more that most of your stuff needs to be multiple projects. Like HttpModules need to be on their own while the project they are going to be used in is going to have to reference them by adding them to the project dependants. You can also specify the build order.
 
Back
Top