AJAX :: Cascading Dropdownlists Error 500?

Aug 6, 2010

I have a web app with several groups of cascading dropdownlists. All the cascading dropdownlists work as designed, but now the app is in the live enviroment with multiple users they are getting error 500 messages returned in some of the dropdownlists. Just wondered if there is a set amount of time to populate between selections? As these users are sometimes waiting tens of mins betwen selecting the values.On some of the dropdowns i'm pasing a date to the method using session variable whether this could be the issue? an example of one of the methods is below:

[Code]....

View 1 Replies


Similar Messages:

AJAX :: Way To Use Two Cascading Dropdownlists With The Same Values

Mar 15, 2010

I'm trying to use two cascading dropdownlists with the same values -- one shows a code, and the other a description. They are sorted alphabetically, so they have the same values, but not the same index. Both are generating correctly. What I am trying to do is set the abbreviation when the description changes (and vice versa).If I use this javascript, it changes on the web page, but I get a null value returned to the form handler. If I comment out the CascadingDropDown control and load the TrickAbbrev from a database it all works.

function scrTrickNameOnChange(ddlId)

View 3 Replies

AJAX :: Populate Data In Cascading Dropdownlists Using Javascript

Dec 10, 2010

Am using masterpages.I have written following code to add rows to dynamictable with html controls.
I need to load data from database in cascading dropdownlists(like country,state);this javascript code is not accepting asp controls.can we load data in cascading html dropdowns? using javascript/AJAX?

html:

<input type="button" value="Add Row" onclick="addRow('dataTable')" /> [code]....

View 1 Replies

AJAX :: Cascading Dropdownlists / Tried A Session Variable But It Comes Up With Session Is Null?

Jul 29, 2010

I have some cascading dropdownlists using the ajax toolkit I have a set up datatables in an xsd file. Then use these in a webservice to populate all the fields ... this all works great but now i need to pass an additional paramter to the first dropdownlist ( a date) but don't know how to do this? The method is below...

[Code]....

The other code is:

[Code]....

The first change would be to the tableadapter to add a param to the code i.e

AuditWebDS.TeamsDataTable teams = teamsAdapter.GetTeams(calldate);

but how do i get the calldate param to the webservice method... i tried a session variable but it comes up with session is null ? Is there another better way?

View 1 Replies

Forms Data Controls :: Cascading DropDownLists In DetailsView?

Sep 10, 2010

Here is the case:

I use Visual Studio 2008 ASP.NET 3.5

I have a DetailsView control with several fields that is in insert mode. Three of them are the source of my problems and headaches.

I have three DropDownLists in template fields.

The first one is OK, bound to it's designated field in table1 in the database. The next two however have to change their bound tables according to the SelectedValue.

So far, I've managed to get it working, BUT when I insert the data I've entered, these two DropDownLists are not entered into the database.

DropDownList3 - the list that controls the other two DDLs

DropDownList4 and DropDownList5 - the list that need to change their items accordingly

DropDownList3 has six different values, so I have 6 tables for each of the other two DDLs

However I have only tried with one to see if it would work, that's why the Sub seems incomplete.

Here is the relevant part of the code:

[Code]....

And the DropDownList3_SelectedIndexChanged sub:

[Code]....

If I leave SelectedValue='<%# Bind("shelves") %>' and SelectedValue='<%# Bind("type") %>' in the <asp:DropDownList> tag of the two DDLs that change values, I get an error when the first one does the postback.

The error is:

Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control. This error, I spent a whole day looking through forums and knowledge bases, but I could find nothing that solves my problem. Maybe the problem is me, but my boss wants this done, despite it is not my area of expertise to write code.

View 6 Replies

Data Controls :: Creating Cascading DropDownLists Without PostBack

Aug 12, 2012

I have 2 dropdown list in my page these are my code

<asp:DropDownList ID="DDLzone1" runat="server" CssClass="DDlzone" OnSelectedIndexChanged="DDLzone1_SelectedIndexChanged" AutoPostBack="true">
</asp:DropDownList>
protected void DDLzone1_SelectedIndexChanged(object sender, EventArgs e) {
DDLstore1.Items.Clear();
DDLstore1.Items.Add(new ListItem("select shopping center", ""));

[Code] ....

When users click on DDLzone1  value of DDlStorre1 will change 

Here for both ddl i set autopostback ="true"  for this it change ddlstore when page is post back 

I want when users click on DDLzone1 value of DDLStore1 be change without loading page again ...

View 1 Replies

AJAX :: Cascading Dropdown Method Error -1?

Dec 6, 2010

I have a cascading dropdown which loads countries into a dropdownlist.

When I type: www.domain.com, it all works.

However, when I type: domain.com it stops working and the dropdown shows: "[method error -1]"

Here's my code:

<asp:TextBox ID="tbCity" Width="90" MaxLength="50" CssClass="inactive" autocomplete="off" runat="server" />
<cc1:AutoCompleteExtender ID="AutoSuggestCities" runat="server" TargetControlID="tbCity"
CompletionInterval="2" CompletionSetCount="50" MinimumPrefixLength="3" ContextKey="" ServicePath="http://www.domain.com/geolocation.asmx" ServiceMethod="GetCitiesForCountryOrProvince" />

ps. I use url rewriting and to make sure the servicepath is always correct I used the full path.

View 7 Replies

Method Error[500] In Cascading Dropdown With Ajax?

Jan 22, 2011

i hv been tryin since a long time..but not able to resolve my problem.M making a cascadin dropdown with ajax but gettin method error 500 in my dropdown on running it..here's my code1. dataservice.cs file

using System;
using System.Web;
using System.Collections;

[code]...

View 1 Replies

AJAX :: Method Error 500 In Cascading DropDown?

Jul 27, 2010

I have created a dropdown through code behind.Then created a Cascading dropdown that also through code behind.

All the properties of cascading dropdown have been initialized properly (as i think).

And web service method is defined in separate file.

DDL and Cascading DDL have been created in App_code/NewFolder through a class file. That webservice.vb file too is placed in this folder. and webservide.asmx file is placed in root directory of the project.

When i run the project dropdown is filled only with [Method error 500]. query to fetch data from database have been written in webservice.vb file without any known error.

View 3 Replies

AJAX :: Cascading DropDownList - Method Error 500

Sep 24, 2013

I would like to populate Cascading DropDownList From SQL Server.

I prepare my project the same way as in this article: [URL] ....

But all the time I have "Method error 500" I read many articles how to solve this issue but without success.

Below there are my codes:

----SQL DB has two tables:

1.tblUAP (UAP (PK), Start_Date,End_Date)
2.tblGAP(idGAP (PK),GAP,UAP(FK to tblUAP))

 ---project1.aspx

<%@ Page Language="C#" EnableEventValidation="false" AutoEventWireup="true" CodeBehind="Project1.aspx.cs" Inherits="TEST.Project1" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
....
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>

[Code].....

----Services.asmx

using System;
using System.Web;
using System.Web.Services;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;

[Code] ....

What else Can I check ??

View 1 Replies

Forms Data Controls :: Implement A Form Of Cascading Dropdownlists And Associated Controls?

Dec 4, 2010

I've got 3 SqlDataSource controls, and 2 dropdownlists and 1 detailsview on a page. The first SqlDataSource is associated with the first dropdownlist, and second SqlDataSource (which is filtered based upon the selection chosen in the first dropdownlist) is associated with the second dropdownlist and the third SqlDataSource (which is filtered both by the selection of the first dropdownlist and the second dropdownlist) is associated with the detailsview. The idea is the user selects something in the first dropdownlist, and it is supposed to update what is returned by the second SqlDataSource control and second dropdownlist, and that in turn is supposed to change what is returned in the third SqlDataSource control and it's associated detailsview. All of the dropdownlists have AutoPostback set to True.

View 11 Replies

AJAX :: To Submit The Values Of cascading Dropdown Without Error It needs To Turn Eventvalidation Off

Mar 19, 2010

I have 3 cascading dropdown lists in an update panel. To submit the values of cascading dropdown without error it needs to turn eventvalidation off. Is there any way that i can avoid turning off the event validation and still use cascading dropdown?

View 1 Replies

[Method Error 500] In Cascading Dropdown Update In Ajax Control Toolkit

Apr 16, 2010

I am getting [MethodError 500] when I use cascading drop down. below is my code

<tr>
<td >
Select a Hoster:
</td>
<td>
<asp:DropDownList ID="ddlFeaturedHoster" runat="server" ></asp:DropDownList>
</td>
</tr>
<ajaxToolkit:CascadingDropDown ID="cddHoster" runat="server" TargetControlID="ddlFeaturedHoster"
PromptText="Select a Hoster" LoadingText="Loading ..." Category="ActiveHoster"
ServiceMethod="GetDropDownContents" ServicePath="~/Hosting/HostingService.asmx"/>
Service Code:
[WebMethod]
[ScriptMethod]
public CascadingDropDownNameValue[] GetActiveHosters()
{
List<CascadingDropDownNameValue> returnList = new List<CascadingDropDownNameValue>();
HostersManager hosterManager = new HostersManager();
List<Hosters_HostingProviderDetail> hosters = hosterManager.GetAllHosters();
returnList.Add(new CascadingDropDownNameValue("--Please Select One--","0",true));
foreach (Hosters_HostingProviderDetail item in hosters)
{
returnList.Add(new CascadingDropDownNameValue() { name=item.HostingProviderName, value= item.HosterID.ToString()});
}
return returnList.ToArray() ;
}
[WebMethod]
[ScriptMethod]
public CascadingDropDownNameValue[] GetDropDownContents(string knownCategoryValues, string category)
{
knownCategoryValues = FormatCategoryWord(knownCategoryValues);
List<CascadingDropDownNameValue> values = new List<CascadingDropDownNameValue>();
HostersManager hosterManager = new HostersManager();
switch (category)
{
case "ActiveHoster":
values.AddRange(GetActiveHosters());
break;
case "ActiveOffer":
values.AddRange(GetActiveOffers(1));
break;
}
return values.ToArray<CascadingDropDownNameValue>();
}
/// <summary>
/// Formats the category word
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
private string FormatCategoryWord(string value)
{
if (string.IsNullOrEmpty(value)) return value;
if (value.LastIndexOf(":") > 0) value = value.Substring(value.LastIndexOf(":") + 1);
if (value.LastIndexOf(";") > 0) value = value.Substring(0, value.LastIndexOf(";"));
return value;
}
}

View 2 Replies

Web Forms :: Changing Index On Dropdownlists Childs Don´t Cause Other Dropdownlists To Reload?

Jan 30, 2011

i have the following code:

[Code]....

3 nested dropdownlists SELECTing from DB. So i select the brand, then i select the model and then i select the product and click on SEARCH button.

But when i select thebrand, and then the model, and if i want to change the brand, it does not reset the second and third dropdownlists.

View 3 Replies

AJAX :: Dropdownlists Not Disabled - Reason?

Jul 28, 2010

I have an accordion and a nested accordion as a menu ba on left. thepanes contain various controls mainly dropdownlists. I disable the accordion after a user has enetered some values and clicked the search button. However in IE7 the accordion is disabld and all the contained controls are too. But in IE6 the dropdownlists aren't disabled whats the reason behind this and whats the solution?

View 6 Replies

AJAX :: Replace Dropdownlists With ComboBoxes?

Feb 12, 2010

I've been trying to replace my dropdownlists with ajax ComboBoxes so i can apply css in ie.

I can't seem to apply any css to the items in the dropdownlist. Here is my css:[Code]....

I've tried putting font styles in every class but it does nothing. The font in the actual text bar is styled correctly.

Also i've noticed the dropdownlist doesn't display all the items in it. Only the top 2.

View 1 Replies

AJAX :: CasadingDropDown Not Populating DropDownLists?

Dec 25, 2010

I'm trying to make cascadingdropdownlists work on my web form. I was following this tutorial:

[URL]

I followed that tutorial almost ot the T. But when I run my page, neither of my dropdownlists become populated. I don't know what I'm missing...

Heres the code for my Form:

[Code]....

Here's the code for my WebService:

[Code]....

And Here's the code for my Web.config file

[Code]....

View 3 Replies

AJAX :: Programming Model - Getting Values Of Dropdownlists

Feb 6, 2010

Imagine I'm developing a webform with two dropdownlists and a submit button. The second dropdownlist depends on the choice in the first, and both are loaded dynamically using webmethods being called with javascript in de ASPX page (ajax). When I submit the form to the server, to save the data, I can't get the value of those dropdownlists. I think it is because with client AJAX no viewstate data is being generated. I need to send the data to the server and save the webform data, and identify wich data is on each webcontrol.

View 3 Replies

Cascading Comboboxes To Work - Getting Method Error 500

Jan 31, 2011

I am trying to get my cascading comboboxes to work, but am getting a [Method error 500]. Any ideas? I've searched online, the code should work....Thanks in advance for your help!

ADDSTORY.ASPX:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="addstory.aspx.cs" Inherits="addstory" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<form id="form1" runat="server">
<asp:ToolkitScriptManager ID="ScriptManager1" runat="server" />
<td class="style3">
<asp:DropDownList ID="selectproject" runat="server" Width="225"></asp:DropDownList>
<asp:CascadingDropDown ID="ccd1" runat="server"
ServicePath="~/dropdown.asmx?company=<%=co_id %>" ServiceMethod="GetProjects"
TargetControlID="selectproject" Category="Project"
PromptText="Select Project" />
</td>
</tr>
<tr>
<td class="style3"></td>
<td width = "150" class="style3">Iteration:</td>
<d class="style3">
<asp:DropDownList ID="selectiteration" runat="server" Width="225"></asp:DropDownList>
<asp:CascadingDropDown ID="ccd2" runat="server"
ServicePath="~/dropdown.asmx?company=<%=co_id %>" ServiceMethod="GetIterations"
TargetControlID="selectiteration" Category="Iteration"
PromptText="Select Iteration" />
</td>
</tr>
DROPDOWN.ASMX:
using System.Web.Script.Services;
using AjaxControlToolkit;
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Data.SqlClient;
/// <summary>
/// Summary description for WebService
/// </summary>
[WebService(Namespace = "[URL]/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
[System.Web.Script.Services.ScriptService()]
public class dropdown : System.Web.Services.WebService
{
private string GetConnectionString()
{
return System.Configuration.ConfigurationManager.ConnectionStrings["MyConnection"].ConnectionString;
}
[WebMethod]
public CascadingDropDownNameValue[] GetProjects(string knownCategoryValues, string category)
{
string co_id = this.Context.Request.QueryString["company"].ToString();
SqlConnection conn = new SqlConnection(GetConnectionString());
sonn.Open();
SqlCommand comm = new SqlCommand("Select ProjectName, ProjectID FROM Project WHERE CompanyID = '" + co_id + "'", conn);
SqlDataReader dr = comm.ExecuteReader();
List<CascadingDropDownNameValue> l = new List<CascadingDropDownNameValue>();
while (dr.Read())
{
l.Add(new CascadingDropDownNameValue(dr["ProjectName"].ToString(), dr["ProjectID"].ToString()));
}
conn.Close();
return l.ToArray();
}
[WebMethod]
public CascadingDropDownNameValue[] GetIterations(string knownCategoryValues, string category)
{
int ProjectID;
StringDictionary kv = CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues);
if (!kv.ContainsKey("Project") || !Int32.TryParse(kv["Project"], out ProjectID))
{
throw new ArgumentException("Couldn't find project.");
};
SqlConnection conn = new SqlConnection(GetConnectionString());
conn.Open();
SqlCommand comm = new SqlCommand("SELECT Select CONVERT(VARCHAR(10), StartDate, 103) + ' - ' + CONVERT(VARCHAR(10), EndDate, 103) AS Iteration, ProjectIterationID FROM Iterations WHERE ProjectID=@ProjectID", conn);
comm.Parameters.AddWithValue("@ProjectID", ProjectID);
SqlDataReader dr = comm.ExecuteReader();
List<CascadingDropDownNameValue> l = new List<CascadingDropDownNameValue>();
while (dr.Read())
{
l.Add(new CascadingDropDownNameValue(dr["Iteration"].ToString(), dr["ProjectIterationID"].ToString()));
}
conn.Close();
return l.ToArray();
}
}

View 1 Replies

AJAX :: Ajax Cascading Dropdown Control Not Working On IIS After Deploying?

Jan 12, 2011

I am new to Ajax Control Toolkit, with the help of online tutorials I had created a cascading dropdown list in asp.net and tested it on my local machine. For this dropdown list data source would be an xml file (which is saved on my local machine c drive). I haven't encountered any issues until I deploy the precompiled web site on to IIS 7. When I open the web site from IIS I would see the two dropdown boxes on the web page with an error "Method error 500". I believe this error occured due to incorrect xml file
path provided on IIS. I had copied xml and xsd files into IIS server C drive but it did not help out and then I created a network map and placed the xml and xsd files in that shared folder tried to access that path from web service, it's working on local machine but not on IIS. It would be great, if any one could explain me the solution.

Following is the .aspx and .asmx code:

.aspx code:

<form id="form1" runat="server"> <div> <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </asp:ToolkitScriptManager> <br /> <table> <tr> <td> <asp:DropDownList ID="DropDownList1" runat="server"
Height="20px" Width="257px"> </asp:DropDownList> <asp:CascadingDropDown ID="CascadingDropDown1" runat="server" Category="Category" TargetControlID="DropDownList1" PromptText="[select category]" ServicePath="~/WebService.asmx" ServiceMethod="GetCategory"> </asp:CascadingDropDown>
<br /> </td> </tr> <tr> <td> <asp:DropDownList ID="DropDownList2" runat="server" Height="20px" Width="257px"> </asp:DropDownList> <asp:CascadingDropDown ID="CascadingDropDown2" runat="server" Category="Type" TargetControlID="DropDownList2" PromptText="Select
Type]" LoadingText="Loading Type.." ParentControlID="DropDownList1" ServicePath="~/WebService.asmx" ServiceMethod="GetType"> </asp:CascadingDropDown> <br /> </td> </tr> </table> </div> </form>

.asmx code(.cs code):

[WebMethod]
public AjaxControlToolkit.CascadingDropDownNameValue[] GetCategory(string knownCategoryValues, string category)
{
XmlDocument _doc = new XmlDocument();
_doc.Load(HttpContext.Current.Server.MapPath("~/C:/ItSupportCategory.xml"));
XmlNodeList list = _doc.SelectNodes("/CategoryList/Category");
List<CascadingDropDownNameValue> categorylist = new List<CascadingDropDownNameValue>();
foreach (XmlNode node in list)
{
string catid = node.Attributes["value"].Value.ToString();
string catname = node.Attributes["name"].Value.ToString();
categorylist.Add( new CascadingDropDownNameValue(catname,catid));
}
return categorylist.ToArray();
}
[WebMethod]
public AjaxControlToolkit.CascadingDropDownNameValue[] GetType(string knownCategoryValues, string category)
{
int catID;
StringDictionary selectedvalue = AjaxControlToolkit.CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues);
catID = Convert.ToInt32(selectedvalue["category"]);
List<AjaxControlToolkit.CascadingDropDownNameValue> cascadingValues = new List<AjaxControlToolkit.CascadingDropDownNameValue>();
XmlDocument _doc = new XmlDocument();
_doc.Load(HttpContext.Current.Server.MapPath("~/C:/ItSupportCategory.xml"));
XmlElement root = (XmlElement)_doc.SelectSingleNode("/CategoryList/Category[@value='" + catID + "']");
for (int i = 0; i < root.ChildNodes.Count; i++)
{
string typeid = root.ChildNodes[i].Attributes["value"].Value.ToString();
string typename = root.ChildNodes[i].Attributes["name"].Value.ToString();
cascadingValues.Add(new CascadingDropDownNameValue(typename, typeid));
}
return cascadingValues.ToArray();
}
Xml File:
<?xml version="1.0"?>
<CategoryList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="test.xsd">
<Category value ="1" name="SYSTEM WIDE">
<Type value ="1" name="Email"/>
<Type value="2" name="SAP Locked"/>
<Type value="3" name="Job Archive Full" />
</Category>
<Category value="2" name="SAP">
<Type value="3" name="Pricing Incorrect"/>
<Type value="5" name="New Item #"/>
<Type value="6" name="Reports"/>
<Type value="7" name="New User Setup"/>
</Category>
<Category value="3" name="OTHER">
<Type value="8" name="Production"/>
<Type value="9" name="Office"/>
<Type value="10" name="Toner for Printer"/>
<Type value="11" name="Security Camre Lookup"/>
</Category>
</CategoryList>

View 2 Replies

DropDownLists Affecting Other DropDownLists?

Jun 25, 2010

I'm wondering how I can make one dropdownlist affect another one.. For example...You select your country from a drop down list of countries. On selecting it, another dropdown list becomes visible and displays the states of your country. I'm taking this data from a database, so it merely has to link to a different table for each country selected.

Also, I want the option of being able to add a 'state' to the database from the webform by typing whatever its called into the combobox so that future users will see that option.

View 8 Replies

Error 500 In Cascading Dropdown While Filling 3092 Records From Database Via Webservice

Jan 22, 2011

I am getting the error Method 500 while filling 3092 cities in to cascading dropdown control. i am using the following code.

<asp:ScriptManager ID="ScriptManager1" runat="server">
<Services>
<asp:ServiceReference Path="HotelDestination.asmx" />
</Services>
</asp:ScriptManager>
[code]...

View 2 Replies

AJAX :: How To Disable Ajax Cascading Drop Down

Aug 17, 2010

I am using cascading drop downlist for two level in ,selecting county based on state

my requirement is i need to disable/enable cascading drop down on click of gride view edit/view button.

I tried all the java script Onpopulated method but no luck

[Code]....

View 1 Replies

Cascading Dropdown In Using Ajax?

May 6, 2010

I tried cascading dropdown in asp.net using ajax. I have tried with 3 dropdown control. The scenario is First dropdown is loaded when page gets loaded and the second dropdown is loaded based on first is selected and thrid dropdown is loaded based on second one selected, now I want to know how do I load third dropdown based on first and second selected value...

View 1 Replies

AJAX :: Refreshing The Cascading Value?

Sep 14, 2010

At last I got sumthing by which I can refreshed the Cascading Dropdown value by changing the Tab.

But the problem is first tab is working fine but in second tab the values are refreshed but second child dropdown is not disable(First tab all are working fine) .

[Code]....

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved