i have a table T with fields id, parentid, name. i make relationship with own table so parentid=>id one to many, so if parentid=null it is a parent record, and if parentid not null it is child record
after mapping i have class with 2 new properties- T1 (Collection of T) and T2 (Instance of T)
so how can i fill dropdownlistfor, if i not...
Hey,
I've got a DropDownList and I'm trying to prevent it from being used as an attack vector. Can I assume that the user is unable to actually change the values of the DDL and postback to the server? At the moment, I get this ASP.NET error message thrown if I try and change the packet after submission:
For security purposes, this fea...
I am new to Javascript, JSON and jQuery. So please be easy on me. I have a JSP page that contain a drop down list. The contents of the drop down list are populated when the page is loaded. I wrote a Servlet that return the contain of the drop down list in the form of Map, and convert it to JSON string and sent back to the jsp via respons...
hi,
this is the dropdown list link in my edit page
when editing it selects the friend automatically, but i want it shows 'select your exiting friend' by default(whenever the page loads)..
echo $form->input('PostCard.friend_id',array('label'=>_l('Friend Name List'),'empty'=>_l('Select Your Existing Friend'),'options'=>$friends));
...
I am trying to create a form in ASP.NET MVC2 RC 2 that is based on a calendar event object. The object has eventTypeId which is a System.Int32 that I need to populate with via a select list.
The controller to create the initial view is:
[WAuthorize]
public ActionResult AddCalendarEvent()
{
CalendarEventTypesManager calendarEventTyp...
i hope i have asked the question title correctly. let me explain my issue -
i am making a table through vb.net code (htmltablecell, htmltablerow..) no this table populates with an sql query and works perfectly. but inside this table in one tablecell, i need to add a dropdownlist which shall require a completely differernt query and shall...
Hi everyone,
I would like to implement a dropdownlist with some listedItems.After that I want for every selected item to be connected to a new aspx page(i.e. if I select meat I want to have a new aspx page that will contain some information about the meat). Does anybody have any ideas? Thanks,
Naim
...
Hello,
I'm new to ASP.NET MVC. I'm trying to figure out how create a basic drop down list from values in my database. In ASP.NET web forms, I know I can load a drop down list like this:
Page.aspx
<asp:DropDownList ID="myDropDownList" runat="server" DataTextField="FullName" DataValueField="ID" OnLoad="myDropDownList_Load" />
Page.asp...
I am trying to understand the best way of implementing a DropDownList in ASP.NET MVC 2 using the DropDownListFor helper. This is a multi-part question.
First, what is the best way to pass the list data to the view?
Pass the list in your model with a SelectList property that contains the data
Pass the list in via ViewData
How do I g...
How do I add a Multiple selection list to an Excel spredsheet in each cell of one column. I need to be able to read the selected values in c#.
Looking for a managed code solution. CANNOT USE INTEROP
Anything that allows a multiple selection and the aability to read using OLEDB, currently using a listbox.
WE can only use ADO.NET & C#
...
I've got 2 dropdownboxes. Dropdownbox 1 shows all the tables from a database. When dropdownbox 1 is selected; dropdownbox 2 will be populated with tablefields from the selected table.
dropdownbox 1:
This dropdown is populated with the following mysql query: "show tables from testdb"
dropdownbox 2:
This dropdown will auto populate when ...
I am working on a GridView in Asp.Net. When initially a the Page Loads, my gridview look like:
When a user clicks, to edit a row, I am using edit templates to show 'Domain' in a DropDownList. But problem is , when the DropDownlist gets load with data, it lost the current value of the 'Domain'.
i.e If I want to edit 4th Row, its domain ...
here's my code. I have a dataset that has its values and then i run an independent query which uses the same tables as dataset. now when i run the dataset, i want it to get a where condition on the query result.
here's the code -
sql = "SELECT ID, name FROM books WITH(NOLOCK) WHERE id =" & Session("ID")
ds = FillDataset(sql)
...
Here is what I got:
<select id="box1">
<option>ABCDEFG</option>
</select>
<select id="box2">
<option>ABCDEFGHIJKLMNO</option>
</select>
I have 2 different Drop Down lists. Since the width of a drop down list depends on the width of the longest text in the option, I end up with 2 drop down lists with 2 different widths. This ...
Consider a asp:dropdownlist which fires SelectedIndexChangedEvent based on listitem index.....
But why the event doesn't fire for the same listitem index when selected again....
...
I noticed what seems to me a bug in asp.net MVC or simply I am doing something wrong. I am currently using 1.0 so maybe this is something that will be addressed in the 2.0 release. But either way, here we go.
When I my view model has a property which is the same name as the declared id for a drop down list, the selected item is ignored ...
I have 2 queries. One is populating a dataset that populates the dropdownlist and the other populates rest of the textboxes of a table row. i want to know how can i fill the entire dropdownlist and then make selectedvalue the value from the other query?
e.g -
dataset query = select hobby from hobbies
other query - select name, dob, add...
My company had a website we're working on redone by a designer. It looks much better, but I've hit a snag implementing their design in HTML+CSS. They have a heavily styled <select> box, so much so that I couldn't recreate it with pure CSS. I found a solution that uses Javascript to replace the <select> box with a <ul>. This works almost ...
Hi,
In my code I have 2 ComboBox DropDownLists, created by the code below. The problem is that when the value of the DropDownlist get changed, the other one value also changes. Can you please help me how I can solve this problem?
public class Translate
{
public string CountryName { get; set; }
public string CountryCode { get; s...
I have a drop down list, if someone selects an option I want to redirect to another page based on the selection.
How can I do this via jquery?
...