Showing posts with label clear. Show all posts
Showing posts with label clear. Show all posts

Monday, March 26, 2012

How do I deploy an AJAX Toolkit web app?

This seems like a pretty common thing to want to do, yet I can't find anything (clear) in the documentation or various forums. Simply put, how do I deploy an AJAX enabled ASP.NET 2.0 application?

I can get the files on the server no problem, but what do I need to install on the server to get the AJAX 1.0 code to work? I assume I just need to install AJAX 1.0 on the server, and everything should be fine, right? If so, then why isn't my AJAX code working. If not, then what am I missing?

Note, I'm using the CascadingDropDown control. It works fine on my development computer, but I get the following message when trying to run it on our web server:

AjaxControlToolkit.CascadingDropDown missing required Category property value for CascadingDropDown1.
Parameter name: Category

The category parameter is being set, so I don't understand what the error is.

Any help is much appreciated.

Hi...

and welcome to ASP.NET Forums!

I have an article on cascading dropdownlist. Check this linkhttp://www.aspalliance.com/1183

You also need to make sure, the parameter names should be the same (case-sensitive) as defined in the docs.

Thanks

How do i clear/reset a cascadingdropdown?

i have three dropdownlists. once i've selected third i fire a postback using the third dropdown's autopostback property. my question is how do i get all the dropdowns to reset back to their prompt messages ready to be used again.

i've tried changing the selectedindexes for the dropdowns to 0 and -1 but that doesn't work

Check outthis thread.

isn't there an easier way of doing this? Seems like a lot of work just to reset the dropdownlists


Hi Iljones,

Based on my research, I think the best solution is to modify the source code to meet your expectation. Here is another sample, please add the code below to your source code. When the last CascadingDropDown populated , onpopulated function will be called and it will set the first CascadingDropDown's selectedIndex to be 0.

<script type="text/javascript" language="javascript">
var flag = true;
function pageLoad(sender, args){
$find("myCDECity").add_populated(onpopulated);
}
function onpopulated(sender,args){
if(flag){
flag = false;
$get("<%=dlState.ClientID%>").selectedIndex = 0;
$find("myCDECity")._onParentChange(false);
$get("<%=dlCity.ClientID%>").disabled = true;
}
}
</script>

Hope this help.

Best Regards,

Jonathan


Jonathan Shen – MSFT:

Hi Iljones,

Based on my research, I think the best solution is to modify the source code to meet your expectation. Here is another sample, please add the code below to your source code. When the last CascadingDropDown populated , onpopulated function will be called and it will set the first CascadingDropDown's selectedIndex to be 0.

<script type="text/javascript" language="javascript">
var flag = true;
function pageLoad(sender, args){
$find("myCDECity").add_populated(onpopulated);
}
function onpopulated(sender,args){
if(flag){
flag = false;
$get("<%=dlState.ClientID%>").selectedIndex = 0;
$find("myCDECity")._onParentChange(false);
$get("<%=dlCity.ClientID%>").disabled = true;
}
}
</script>

Hope this help.

Best Regards,

Jonathan

i'll give this a go today and let you know how it goes. Thanks Jonathan


Probarly to late, but here is an answer anyway.

CS: protected void Reset_Click(object sender, EventArgs e) { CascadingDropDown1.SelectedValue = null; }