How To Populate Folder Hierarchy Into DropDownList
Jan 19, 2010
write a Subroutine that takes a parameter value of a Folder name on the server, then looks for all subdirectories beneath it and puts this hierarchy into a DropDownList?
So far I can't get the sub to work as it stuggles with the path structure and the obvious requirement to call itself.
I'm currently working on a project where I need to segregate some of the views within a controller I have a little better.I want to do something like:
{controller}/{action1}/{action2}/{id}
So let's just say
/Clients/Jobs/Edit/e124929
So I guess I'm looking to have "sub-actions" of my actions?It's achievable with via routing. How should I set the route up for this, and how should I create the routine in my controller to handle the "sub-actions"?
retrieving values related to user select a country then its automatically shows the states name of that country in next dropdownlist and after that it will automatically display the city names respected to that country.
there is a radio button, a dropdownlist. radiobuttons are OY, OTY,VDA ( in my database there are fields named OY.OTY,VDA) if i select OY in my radio button the data should be displayed from field OY in dropdownlist and if i select OTY in my radio button the data should be displayed from OTY field in dropdownlist is it possible. there is a sqldatasource for dropdownlist .
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MS16ConnectionString %>" SelectCommand="SELECT DISTINCT OY FROM COURSE_INTAKE"> </asp:SqlDataSource>
THE SELECTED DROPDOWNLIST DATA IS REQUIRDE TO BE DISPLYED IN A GRIDVIEW.
I have 2 dropdownlist, one is to dropdown department, and another dropdown staffnames. the secong dropdownlist will based on the selection of department as each department has different staffs i have 2 tables department and staff in my database , in my department table i have departmentid as PK and departmentname, in my staff table i have staffname and departmentid as FK. So my ques is how am i going to populate staffname in the dropdownlist according to the selection of department.
I am trying to develop a simple MVC 2 timesheet application for my small business. I have a sort of mock model for now until I have a database in place, just to make things simpler while I develop the functionality.
[Code]....
But then I need to populate a second dropdownlist (taskDropDownList for the tasks associated with a particular customer) based on the selection the user chooses in the customer dropdownlist. But how do I do this exactly? I have seen examples with jQuery, but I'm not sure how to apply them to this situation. Also, the examples seem to just populate the lists with string values. I need to be able to access the objects with all their properties. Because the next thing I need to do is to be able to populate the TimeSegments list of the selected task with values from input fields (i.e. the hours worked for particular dates). And for that to be saved to the "model" (eventually to the database) in the controller, how do I get it there, unless the objects are all part of the same model bound to the View? I'm on rather thin ice with this since I still find the connection between the View and the Controller hard to handle, compared with e.g. Windows development, where these things are rather easy to do.
I have a WebDataGrid linked to a SqlDataSource to display data. When a row is selected, I want to populate some textboxes and dropdownlists with the data from that row, for editing purposes. The textboxes work fine; I use the following code to select the second field in the grid (Date) and populate the corresponding textbox (I'm using VB): txtDate.Text = currentRow.Items(2).Value However, when I try to populate the dropdownlists using the same code structure, I get the following error:
'ddlType' has a SelectedValue which is invalid because it does not exist in the list of items.
I think the problem may be that the dropdownlists are populated using type_id, while the grid displays type_name. Would this be causing the problem, and is there a way to get around this?
I have a very long list of items for a dropdownlist. As the list is very long, I would like to only show the items in the list if the user actually clicks on the dropdownlist to expand it. I found various tutorials on how to use AJAX with cascading dropdownlists but none explaining if it is possible to have just one dropdownlist which gets populated with AJAX when the user expands it. Are there any extenders coming with the AJAX toolkit that I missed? What would be the best way of achieving this?
I have an SQL Data Source which selects all rows of a table. I need to populate a dropdownlist with a certain field ('percentage') of all the rows, and when one is clicked to make the 'value' the rows 'id' field. Is there a simple way of doing this?
I have a textbox that returns 1 or sometimes more rows.....what I would like to do is basically use that textbox to populate my dropdownlist..See sample data
ID Colour
A red
A white
B blue
So for example...if the user types in A in the textbox
The dropdownlist should be populated with red and white
and if the user types in B, the dropdownlist should populate with just blue
I am using 3 dropdown list in a gridview and the values for the dropdownlist is dynamic from database.based on first dropdown list selected value the values must fill to second dropdown and based on second dropdownlist selected value then items should load to 3rd dropdown and same for 4th dropdown list. Here if i select age,gender,sex, fist name, last name from the template name Human. The first drop down only populate the fields like Age,gender,Sex and so on., When the second dropdown list populate from the fields corresponding Template name Human, Finance, and so on.
I'm running into a minor issue with some ASP.Net code I'm working on. For simplicity sake lets say I have two dropdownlists, one that is full of various items and another that is full of other items, but based off the selected item of the first dropdownlist. I currently set variables into hidden inputs to check to see if the item in the first dropdownlist has changed and if it has to change the second dropdownlist, but I'm also having to check to make sure that if something else causes a postback to NOT repopulate the second dropdownlist as to not lose what is currently selected by the user. This check also allows me to make sure that when I navigate away from the page, the correct values are selected and not something replaced by a postback repopulation.
I'm new to ASP.Net/HTML/CSS/Javascript and the like. I know while what I have works, it isn't even close to being the correct way to do things. correct my ways and figure out the BEST way to solve this current problem. Some good ASP.Net tutorial websites would be nice too as I need to keep improving my skills with it.
How would I setup a dropdownlist to check the dates in the database and populate it based on the years of the dates currently in the database? So if some dates were from 2010 and some where from 2011, it would display a dropdownlist with two options in it...2010, 2011.
I have dates listed in my database for a schedule system and would like to add a dropdownlist so I can only list the dates for the current year by default, then a user has to select a date from the dropdownlist to see any dates from a different year. Otherwise, it just shows all dates, regardless of year...
i am using visual studio 2005 and i tried to data bind each drop down list by choosing a data source. my requirements are that one of the drop downlist for builder's email and the other drop down list for manager's email. How do i do that by using the datasource configuration wizard?