質問

I have a ComboBox in my page:

<dx:ASPxComboBox ID="comboSiteID" runat="server" style="margin-bottom: 0px" ValueField="name" Width="120px"></dx:ASPxComboBox>

When the user select an item from this combobox, i want to query MSSQL and show the returning value on a label:

<dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="Value is here"></dx:ASPxLabel>

It seems that the client side event is the appropriate one to put my code

<clientsideevents TextChanged="function(s, e) {
    // What to do?
}" />

What is the best way to succeed this task?

役に立ちましたか?

解決

If you do it client-side, then you need to call a web service, have that web service query the database, and return the results via JSON. Is that really what you are looking to do? If you are, the webservice is the trick.

Or, you can set AutoPostBack="true", the page posts back to the server, and from there query the DB and load the results in the label.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top