Click here to Skip to main content
15,912,204 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to solve error[Method error 500] while using cascading dropdown..?.
I gave it as:
ASP.NET
<ajaxToolkit:CascadingDropDown ID="ddlProjectName_CascadingDropDown"
                     runat="server" TargetControlID="ddlProjectName" ParentControlID="ddlClientName"
                     Category="clientname" ServiceMethod="GetProjectDetailsById" PromptText="select" PromptValue="" LoadingText="select">
                 </ajaxToolkit:CascadingDropDown>

Actually our project contains several other projects so in top we will call references as:
C#
using TicketSystem.Bll;
    using TicketSystem.Bll.Interface;
    using TicketSystem.Utilities;
    using TicketSystem.Utilities.Entities;
and then give as:
 protected void ddlClientName_SelectedIndexChanged(object sender, EventArgs e)
        {

            int ClientId = Convert.ToInt32(ddlClientName.SelectedValue);
            var httpCookie = Response.Cookies["ClientId2"];
            if (httpCookie != null) httpCookie.Value = ClientId.ToString();

            ddlProjectName.DataSource = _TaskService.GetProjectDetailsById(ClientId);
            ddlProjectName.DataValueField = "ProjectId";
            ddlProjectName.DataTextField = "ProjectName";
            ddlProjectName.DataBind();
            if (ddlProjectName.Items.Count!= 0)
            {
                ddlProjectName.Items.Insert(0, new ListItem("--Select--", "0"));
            }
         
        }
Posted
Updated 2-Dec-12 22:36pm
v4
Comments
Herman<T>.Instance 3-Dec-12 3:54am    
it a bit more detail (code snippit) could help us to help you
Sharon 2 3-Dec-12 3:59am    
i dont know much about this error
OriginalGriff 3-Dec-12 4:04am    
What digimanus is saying is that you haven't provided us with enough information to help you to solve the problem.
We need to see the relevant code fragment that produces the error, or we would just be guessing!
Use the "Improve question" widget to edit your question and provide better information.
[no name] 3-Dec-12 4:17am    
Where's your service??
Sharon 2 3-Dec-12 4:22am    
Actually our project contains several other projects so in top we will call references as:
using TicketSystem.Bll;
using TicketSystem.Bll.Interface;
using TicketSystem.Utilities;
using TicketSystem.Utilities.Entities;
and then give as:
protected void ddlClientName_SelectedIndexChanged(object sender, EventArgs e)
{

int ClientId = Convert.ToInt32(ddlClientName.SelectedValue);
var httpCookie = Response.Cookies["ClientId2"];
if (httpCookie != null) httpCookie.Value = ClientId.ToString();

ddlProjectName.DataSource = _TaskService.GetProjectDetailsById(ClientId);
ddlProjectName.DataValueField = "ProjectId";
ddlProjectName.DataTextField = "ProjectName";
ddlProjectName.DataBind();
if (ddlProjectName.Items.Count!= 0)
{
ddlProjectName.Items.Insert(0, new ListItem("--Select--", "0"));
}

}

1 solution

A 500 normally just means that there was an exception in the server side code, which wasn't handled.

You'll need to trace/log through the webservice to see what is failing.

You're almost certainly looking for a .Net code error.

more info @ http://forums.asp.net/t/1109698.aspx/1[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900