2

I have searched on SO and search engines, but can't find a solution.
Is it possible to make an ajax call for an asp.net dropdownlist without using an ajaxtoolkit or jquery?
If so, how would I make an ajax call for a dropdownlist box (selecting a value from one dropdown, populates the next dropdownlist control).

4

2 回答 2

0

好吧,您可以使用 Dojo。使用 ajaxtoolkit 或 jquery 有什么问题?

于 2012-08-08T11:26:18.343 回答
0

使用<asp:DropDownList>一套autopostback="true"

然后在 page_load 中:

if (page.isPostback) 
{
   if (Request.Form("__EVENTTARGET") == DROPDOWNID.UniqueID)
   {
        //POPULATE OTHER DROPDOWN
   }
}

哪里 DROPDOWNID 是你给你的 asp:dropdownlist 的 id

于 2012-08-08T11:33:46.630 回答