Yep, Matt is right. Jon, you can think of it like a VB6 form, where each UI
element can fire it's own method when clicked.
So in asp.net, in the UI you'd have e.g.
<asp:button runat="server" text="Click Me" onclick="mybutton_click" />
and in your code behind you'd have
Sub mybutton_click(Sender as Object, E as EventArgs)
' do something
end sub
So when the user clicks the "Click Me" button on the web page, the
"mybutton_click" function gets executed. You don't have to worry so much
anymore about "truly posted" etc. Just make your UI elements & assign their
actions (onchange, onclick, etc.) to functions, and then code the functions.
For a number of ASP.NET pages, the only time you even care when it's posted
is when you want to initialize some values. And you usually do that in the
Page_Load method with some code like
if not (IsPostBack)
' do some initialization code here that only happens when the user first
hits the page
end if
--
Ben Strackany
www.developmentnow.com
<a href="http://www.developmentnow.com">dn</a>
"MattC" <m@m.com> wrote in message
news:u2**************@TK2MSFTNGP15.phx.gbl...
Jon,
Try not to think of the the form as being trully submitted or not. In
essence to get anything done in ASP.NET you must postback, what determines
what happens is what causes the postback. In your case:
the SelectedIndexChanged event of dropdown one, will cause you to get the
value of the selected item and populate dropdown two based on that value.
Somewhere at the bottom you mayhave a button on the Click event you may
then look at the values of the selected items in dropdown lists one and two and
then perform some action.
The need for you to determine when the form has been 'trully' submitted is
done for you by means of which events are fired, if the button is click
you then know they want to submit their selections.
MattC
"Jon" <ru******@msn.com> wrote in message
news:10*************@corp.supernews.com... I am using cascading dropdowns, where the selection in one determines
what fills another. In regular ASP I simply loaded a giant dataset into
javascript array and when you clicked on one dropdown, it populated the
others accordingly.
In ASP.Net, I was looking for a way to do this without javascript. So,
I made my form and put code in the SelectedIndexChanged event of the
dropdown that populates the next dropdown. Of course to do this, you have to
submit the form. Is there a way of determining when the form has been truly
submitted and when it's been submitted simply to fill in the next
dropdown? I'm thinking not, but thought I'd ask before I revert to my javascript
method.
Thanks
--
********************************
Jon Rosenberg