AJAX :: CascadingDropDowns Set From Saved User Selections?
May 28, 2010
I have a set of three dropdowns using the cascadingdropdown extender from the toolkit. It is setup and working fine for saving off user selections to the database. How do i set them when a user comes back to the page to the users saved selections. I use a webservice to set the data for each dropdown as the parent dropdown is selected.
View 1 Replies
Similar Messages:
Feb 17, 2010
handle site navigation and retaining user selections.
On Page 1:
I am using an <asp:ListBox as a filter for an <asp:GridView (gv.datasource=myobj.getdata(lb.selectedvalue))
This functions as expected and the gridview pagination functions as expected.
Each row on the grid provides an <asp:HyperLinkField to navigate to another page (Page 2).
This functions as expected.
On Page 2:
This provides functionality to perform some data creation/manipulation tasks.
It also provides a link to navigate to another page where other tasks can be performed (Page 3).
My query is in relation to returning from Page 3 to Page 2 to Page 1.
I would like to be able to return from Page 3 to Page2 to Page 1 and display earlier selections.
Currently, I am using a combination of querystring parameters and sessions vars on each Page_Load to achieve this.
Q1: What are the recommended ways to achieve this?
Q2: Is it possible to dynamically specify url parameters on a sitemap?
View 1 Replies
Mar 10, 2011
I am an newbie to this technology. I had requirement kind of thing, like, I had 5 cascading drop downs, which I created by using ajax control tool kit drop-down extenders, and used web-service to update the cascading drop downs content.
In the same form I need to create a grid, so based upon selection of the user, the grid should change dynamically, like I would like to have some examples kind of things, lets say, I had Four cascading drop- downs, like 1) Vehicles, 2) Hotels 3)Games 4) Year
And those can be sub-categorized to
1) Vehicles ----- Three Wheelers, Two Wheelers, Four Wheelers
2) Hotels -------- Five Star Hotels, Luxurious Hotels, Restaurants, Bars, Pubs
3) Games ------- Play Stations, Video Games
4) Year ----------- Manufactured or established in that particular year
so, If the user selects vehicles, then we need to show all the information regarding vehicles, and if he selects hotels , we need to get the information of vehicles, and hotels( * note, I may not be able to give u the right example, once again i want remind you that these drop downs were cascading drop downs, based upon one selection, other works) and like wise if he selects year, we need to show information of all the things manufactured or established in that particular year and here year is not a cascading drop down, and all these information is maintained in a single database table
And currently I am using Microsoft Sql Server 2008 R2, Visual Studio 2008, Using c#, ( i would be happy, if anyone gives me a code kind of thing, not mandatory, only if possible)...
View 2 Replies
Mar 4, 2010
I want to determine if the following could be implememted using a sitemap and menu control.
I have implemented the selection and navigation using tables and urls.
Each page request the querystring data, get the sql data and create the required selection and navigation urls.
Customers.aspx contains a list of customers with a url for each customer.
[code]....
Can I use a sitemap and menu or tree to provide the back navigation described in the scenario above.
Is it possible to modify the url for one or more sitemapnodes based on a user selection on a page?
Is it possible to add/remove sitemapnodes based on a user selection on a menu?
View 1 Replies
Jul 23, 2010
I have a requirement to allow users select multiple "Agencies" and populate the "Types" based on that selection. Cascading Drop down would have been a great fit if there is no mutliple selection involved. I am wondering if I could use a popup dropdown with chekcboxes. However, these checkboxes need to be populated dynamically by a web service. I am not very familiar with AJAX toolkit and what control would work best in this case.
View 1 Replies
May 14, 2010
Does anyone know if it is possible to have Cascading DropDown Lists which are based on the selected value of more than a single list. Example - I have four tables in a database as follows:
Product
PartA
PartB
PartC
The items in Product are made up by one record from each of the other three tables (PartA + PartB + PartC = Product). What I wish to do is have 3 Cascading DropDown lists which refer to the three individual parts which can be used to select items fromt he Product table.
The first two work no problem but when it comes to the third the list is condition on only items which have the selects of both the first two lists.
View 4 Replies
Feb 14, 2011
What is the best approach for keeping a user's search criteria saved in case they navigate back to the search page in MVC 2?
I was thinking of ViewData or creating a model that would keep that type of data.
View 2 Replies
Aug 15, 2012
I have an Excel file, when I go to the Explorer I can see information of when the file was last saved (LastWriteTime).
How do I get that code of who has saved the file, is that possible?
View 3 Replies
Feb 2, 2010
I m facing a problem in clearing user name and password fields saved in IE and FireFox. I tried Assigning empty string to my text boxes on page load but that didt worked. The only way that worked for me was to assign " " space to my text boxes. But that way on tab event mu cursor is not moving to next control rather it first removes space from text box and then moves to next control. I need to fix this ASAP, Can any one help me out with this.
View 3 Replies
Jan 16, 2010
I followed the following linkhttp://weblogs.asp.net/justinsaraceno/archive/2008/02/22/reorderlist-with-objectdatasource.aspxand manged to make the orderlist work fine except one thing and probably the most importent thingwhich is saving the reorder back to the databasewhat I changedfirst I'm using it as a c# web form inside a visual basic.net website. Is this OK?second I changed the connectionString to point to my database wich is in SQLEXPRESS ( NOT ATTACHED in App_Data inside the website as the example shows)third I changed the select and update statements and parameters to my needsafter all that it works but without saving the reorder back to databaseReorderClass.cs
[Code]....
View 2 Replies
Dec 16, 2010
I'm saving a file with the asyncfileupload ajax plugin from the ajax toolkit and when I save it I'm changing the filename (to avoid multiple files with the same name).
After the file is uploaded, the user needs to know what the file has been named so I'm using this javascript code on the onclientuploadcomplete event.
function UploadComplete(sender, args) {
alert(args.get_fileName());
}
This works except it gets the old name, not the new name (which is determined server-side). Is there any way to get it to return the new name rather than the old name? Or any work around to achieve this?
This is my code in the code behind the get the new filename:
string filename = DateTime.Now.ToString("dMyHmsf") + e.filename;
string strPath = MapPath("~/SavedImages/") + filename;
AsyncFileUpload1.SaveAs(strPath);
View 1 Replies
Apr 15, 2010
I want to use the ajax HTMLEditor, but something is not cleared for me: I understand that I grab the control from the toolbox into my webform, and that everything is done automatically. But, where the data is saved ? How can I take the saved contents and display it in another page ? I thought it should be saved on database. The videos and example I sax don't speak about database. I'm sure that I'm missing something, any missing chain.
View 2 Replies
Sep 20, 2015
I have a submit button that saves record successfully.
The problem i have with it is that it can only show ModalPopupExtender after the first save(first click of the submit button).On the second click of the submit button it doesn't show ModalPopupExtender even though record is saved.How do i go about it.
Here is my markup:
<asp:UpdatePanel runat="server" ID="upMain" UpdateMode="Conditional" ChildrenAsTriggers ="true" >
<ContentTemplate>
<asp:LinkButton ID="lbtn" runat="server" >LinkButton</asp:LinkButton>
[Code].....
View 1 Replies
Jan 15, 2011
I have a web form, which is to allow user to reset their password. When I clicked on the button, I got this error
"Input string was not in a correct format."
The code behind the button is:
[Code]....
When the user types in the new password, this new password will be hashed upon clicking the button and saved into the database.
View 6 Replies
Feb 1, 2011
This seems like it should be prettty easy - but I just can't get it to work!I have an enum in my model, which I want to display as a list of checkboxes. The user can select multiple checkboxes, and I want to save this in the database.
So the enum is like so (approx 20 elements unabridged):
public enum ReferrerType
{
[Description("No Data")]
NoData = 9999,[code]....
And it doesn't work! I guess I'm missing something obvious, but I can't work out what. There are no errors - just an empty database table where referrers should be.
View 2 Replies
Jul 27, 2010
How do I handle selection of multiple items with autocomplete? The objects I return from my JSON web service contain an ID and a Label - the ID is the ID of the entity in the database, and the Label is some text to display for the user.
At the moment, when I select an item in the autocomplete dropdown, the value of the item's ID is stored in a hidden field, and the label is displayed. When I remove the label, I clear the ID of the hidden field - this is done by adding an anchor element to the DOM that handles this.
Now, I want to have multiple selections. I want to be able to enter some text, get an autocomplete dropdown, select an item and some other options, then be able to click an 'Add New' button or the likes to be able to select another instance.
For example, I'd type in a person's name and get an autocomplete selection. I'd select a person, and then enter their age, and click 'Add'. The person's id, name, and age will be stored somewhere so that I can retrieve it on the server side when I post back.
I'm not quite sure how to do it? I'm thinking of a hidden field - I assume that many hidden fields of the same name/id turn up on the server side as an array, which I can then use. But I haven't tried this yet in ASP.NET.
View 1 Replies
Jan 23, 2013
how to do multiple selection in dropdownlist in asp.net
View 1 Replies
Mar 18, 2010
Is there an easy way to clear all the selected items of a checkbox list control? When a user has selected multiple items?
View 2 Replies
Jul 31, 2010
string lvStatus =
string.Empty;
if (ClbLeaveStatus.SelectedIndex == 0) [code]..
how to change this code to multiple selections
View 1 Replies
Jan 20, 2010
I am trying to populate the value(s) of a listbox that has multiple selections:
Assignment Preference:<br />
<asp:ListBox ID="assignmentPreferenceList" SelectionMode="Multiple" runat="server">
<asp:ListItem Value="">None</asp:ListItem>
<asp:ListItem Value="CONTRACTING">CONTRACTING</asp:ListItem>
<asp:ListItem Value="DIRECT HIRE">DIRECT HIRE</asp:ListItem>
<asp:ListItem Value="CONTRACTING-DIRECT HIRE">CONTRACTING-DIRECT HIRE</asp:ListItem>
</asp:ListBox>
I am using a datareader in code behind to "loop" through the values:
string sql4 = "Select * from assignmentPref where tID=" + (dr["id"].ToString());
SqlCommand comm4 = new SqlCommand(sql4, con3);
SqlDataReader dr4 = comm4.ExecuteReader();
while (dr4.Read())
{
assignmentPreferenceList.SelectedValue = (dr["assignmentPref"].ToString());
}
Works great with 1 assignment preference but with 2 or 3 it craps out.
View 7 Replies
Apr 6, 2010
I have a web form that when completed sends an e-mail with the data from the form. I have a list box that permits muptiple selections and it post to the email with the following code.
sb.Append("<br />Products of Interest:....");
for(int i = 0; i < ListBox2.Items.Count;i++)
{
if(ListBox2.Items[i].Selected)
sb.Append(ListBox2.Items[i].Text);
}
It works fine except that when multiple tiems are selected, they run together on the form. Instead of "Beds Dressers Tables", I get "BedsDressersTables".
View 3 Replies
May 21, 2010
I'm experiencing what seems to be a caching issue with Google Chrome and Safari on my cart page. In the cart there are 2 dropdown lists. When you hit the checkout button after changing the values in the dropdown lists, it commits what's selected in the lists to the database.
It's a little bit hard to explain the unexpected behavior so I will try to write it out step by step with an illustration of my problem.
Lets say the first dropdown list has the values of:
VALUE1
VALUE2
VALUE3
And the second dropdown list has the values of:
DUMBO1
DUMBO2
DUMBO3
I add an item to my cart.
Screen Says: VALUE1, DUMBO1
Database Says: VALUE1, DUMBO1
I hit Checkout.
Database says: VALUE1, DUMBO1 (I can't see the dropdown lists after I hit checkout because i'm not at the cart page)
I hit the back button.
Screen Says: VALUE1, DUMBO1
Database Says: VALUE1, DUMBO1
I drop down the VALUE1 combo and select VALUE2, VALUE2 is selected momentarily and then the site posts back and VALUE1 is re-selected in the drop down list (from being reloaded from the DB)
MOMENTARILY Screen Says: VALUE2, DUMBO1
Database Says: VALUE1, DUMBO1
THEN AFTER POSTBACK FROM DROPDOWNLIST_SELECTIONCHANGED EVENT
Screen Says: VALUE1, DUMBO1
Database Says: VALUE1, DUMBO1
Hit Checkout.
Database Says VALUE1 ,DUMBO1 (I can't see the dropdown lists after I hit checkout because i'm not at the cart page)
Go back.
Screen Says: VALUE2, DUMBO1
Database Says: VALUE1, DUMBO1
So it appears that it's remembering my selection of VALUE2 even though it jumped back to VALUE1 before I checked out.
It seems to be a caching problem, however I've got some no-cache code to prevent caching of that page that works great in firefox and internet explorer but seems to be failing in Chrome and Safari. I'm basically returning in the headers for the cart page: no-cache, no-store, and must-revalidate to attempt to prevent caching, but based on this scenario it seems to be caching the page anyway and not reloading it when I hit the back button.
View 1 Replies
Feb 6, 2011
I have a dropdown with names of project managers and a checkboxlist with names of team members. What I want to do is write the IDs of selections made from the dropdown and checkboxlist to the DB. I am using the following code, but only IDs from the checkboxlist are stored in the table. What can I do to store the ID from the dropdown simultaneously? Thanks for your help.
for (int i = 0; i < project_members.Items.Count; i++)
{
if (project_members.Items[i].Selected)
[code]...
View 2 Replies
Feb 21, 2011
Dim List As New List(Of DateTime)
Then in my button click event:
If InputBookinglength.SelectedValue.ToString = "2" Then
Dim paramstring As New StringBuilder
If Session("SelectedDates") IsNot Nothing Then
Dim newList As List(Of DateTime) = DirectCast(Session("SelectedDates"), List(Of DateTime))
[Code]....
This code works fine when selecting multiple days in one month. But when you switch to display a different month, the previous months selections are lost. how to persist the selections when the visible month changes.
View 1 Replies
Apr 30, 2010
I'm having trouble processing a listbox after selecting some items from it. In my markup, the listbox is contained within an asp:panel and is populated during page load in the codebehind. That part works fine.
It's when I select various items and submit that I have trouble. My handler loops through the listbox items but doesn't see any as being selected. I'm not sure why.
Here's the markup:
<asp:Panel ID="panEdit" runat="server" Height="180px" Width="400px" CssClass="ModalWindow">
<table width="100%">
<asp:label runat = "server">Choose your items</asp:label>
tr>
<td>
<asp:ListBox ID="lstFundList" runat="server" SelectionMode="Multiple" OnLoad="lstFundList_LoadData">
</asp:ListBox>
</td>
</tr>
</table>
<asp:Button ID="btnUpdate" runat="server" Text="Update" OnClick="btnUpdate_OnClick"/>
<asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClientClick="$find('ModalPopupExtender1').hide(); return false;" />
</asp:Panel>
In my btnUpdate_OnClick handler I can't see any listbox items that are marked as selected. I assume something strange is going on with respect to postback and the panel?
View 3 Replies