Forum Moderators: open

Message Too Old, No Replies

Calling a C# function from select field

need to call a C# function on chnage event

         

vsgill

12:20 am on Aug 13, 2006 (gmt 0)

10+ Year Member



Hi i am making a select field with an onChange event...
i want to call a C# function from onn this event..
I am Totaly new with ASPX and have no idea how is it gonna work.

<select class="form_field" name="select" language=C# onchange="MY_funtion(this)">

i know this is how i would do it for a ajvascript fucntion but my function is in C#.
Can any1 Help me with this. Thanx in advance..
Vik

Ocean10000

1:35 am on Aug 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The effect of what your trying to do can be done with the Dropdownlist Control supplied in asp.net. And using the SelectedIndexChanged event, to handle when the selected value changes in the dropdown list.

Samples of Dropdown List.
[asp.net...]

Sample code of how to use the SelectedIndexChanged Event.
[msdn2.microsoft.com...]

AutoPost back, aka when the value changes it will cause the page to post back to the server.
[msdn2.microsoft.com...]

vsgill

3:50 pm on Aug 13, 2006 (gmt 0)

10+ Year Member



Thanx Ocean
the links are helpfull