Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: CascadingDropDown ajax control throws method Error404 |
|
Author |
|
snehal-k-patel
Joined: 08 Sep 2010 Posts: 1
|
Posted: Wed 08 Sep '10 17:19 Post subject: CascadingDropDown ajax control throws method Error404 |
|
|
Hi Experts,
We have an Asp.net web application, which is deployed in shared hosting environment. On shared hosting environment initial request to this web application is handled by Linux server and then based on the requested page the Linux server is redirecting request to web server on windows OS.
Now, in our web application, we have used ajaxToolkit's CascadingDropDown control to populate three levels of categories. CascadingDropDown control is making Asynchronous call to database server using web service to fetch required data. In the hybrid system described above, the CascadingDropDown control is throwing Method Error 404.
I would appreciate if some body can guide on how to resolve this issue.
The sample of code snap shot is mentioned below.
*************************************************************
Aspx file.
+++++++++++++++++++++++++++++++++++++++++++++++
<asp:DropDownList ID="ddlMajorLevelCategory" runat="server" Width="250px" ToolTip="Select Major Level Category" TabIndex="1" SkinID="h6BlueArial">
</asp:DropDownList>
<ajaxToolkit:CascadingDropDown ID="ccMajorCategory" runat="server" TargetControlID="ddlMajorLevelCategory" Category="M" PromptText="Major Category" ServicePath="~/WebServices/WebService.asmx" ServiceMethod="GetMajorCategory" />
+++++++++++++++++++++++++++++++++++++++++++++++
asmx webService file
+++++++++++++++++++++++++++++++++++++++++++++++
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public AjaxControlToolkit.CascadingDropDownNameValue[] GetMajorCategory(string knownCategoryValues, string category)
{
DataTable dtCategory = CategoryDAL.GetCategoryName(knownCategoryValues);
List<AjaxControlToolkit.CascadingDropDownNameValue> values =
new List<AjaxControlToolkit.CascadingDropDownNameValue>();
foreach (DataRow dr in dtCategory.Rows)
{
string categoryName = (string)dr["name"];
int categoryId = (int)dr["cat_id"];
values.Add(new AjaxControlToolkit.CascadingDropDownNameValue(categoryName, categoryId.ToString()));
}
return values.ToArray();
}
+++++++++++++++++++++++++++++++++++++++++++++++
*************************************************************
Moderator's Note: Moved to more appropriate category |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Thu 09 Sep '10 12:03 Post subject: |
|
|
What is in your error log about that 404 error? Does the ajax request call the right url? |
|
Back to top |
|
|
|
|
|
|