have two drop down list in my page. When i select one drop down, the value of second drop will change according to the value of first drop down. I don't want page refresh when i select my first drop down. So i use update panel but now when i select the value from my first drop down on the event of selectedindexchanged it will always shows me the default value and if i remove update panel it works perfectly but with page refresh. I don't know what is the problem. Values for both drop down is coming from database. Also i have done !IsPostBack in my page load but i don't know where is the problem..Please check the code below:
I'm at Step 6 in the NerdDinner tutorial. It runs fine until I put in the code beginning in Step 6. I add...
ViewData["Countries"] = new SelectList(PhoneValidator.Countries, dinner.Country);
...in the DinnerController.cs file. I've already found where PhoneValidator.AllCountries should be PhoneValidator.Countries, so that's fixed. But when I run the app and select a country from the new dropdown list...
<p> <label for="Country">Country:</label>
<%= Html.DropDownList("Country", ViewData["Countries"] as SelectList) %> [code]...
How can I have 2 Cascading Drop Down Lists for the same Drop Down List?here is my problemi have 3 drop down lists read from database1- Schools List 2- Classes List3- Teachers ListEvery School will have more than 1 Class and more than 1 TeacherWhat I want is when user select a School from Schools Drop Down List then BOTH (Classes and Teachers) should be refreshed based on the School Drop Down List
The problem is when am assigning my session table value to newly created table and if now am changing any coloumn name then the session table value also changing.
But my question is am assigning Session value to newly created table so how should session value should be affected?
I have a drop down list that has the initials of about 12 of our sales guys.How can I make it so that when they select their initials from the list, the next drop down list only shows their customers.In my database there is a column for customer name and salesman.
I currently have two listboxes and I use arrow buttons to move items from one list to another. Is there a way I could implement drag and dropping between those 2 listboxes.
I have been given by a designer the HTML show below. This is a menu which will be used in throughout our website in a master page. My worry is how can I handle de the different class used depending when the page is selected or not. Below when on the page the id is "bot_seleccionado" and when a page is not selected it is bot1.
I have a webform with difrent parts in it, its like a search criteria, noissues with other parts but theres one part in it called guest profile which is giving me problems.There was a field name called guest company with a textbox by its side, when the user enters the company name and clicks enter it displays the list of people with that company name
but now I have changed this textbox to ddl and populated this ddl with the company names now when I am selecting this company name and clicking enter its not showing the data the code for the above issue is shown below I have also posted the stored procedure used in this
the code used to design the DDL
<tr> <th> Guests Company: </th> <td> <asp:DropDownList ID="ddlCompanyName" runat="server" CssClass="default" /> </td> </tr> the code used to bind the data to this ddl protected void BindCompanyDDL() { var companyList = Company.FindAll(); ddlCompanyName.Items.Add(new ListItem("- Select Company -", "")); foreach (var companyDetail in companyList) { ddlCompanyName.Items.Add(new ListItem(companyDetail.Name, companyDetail.Id.ToString())); } ddlCompanyName.DataBind(); } the code used to initialize search public void InitializeSearch(ref RecipientSearchParams searchParams) { if (!String.IsNullOrEmpty(txtGuestName.Text)) searchParams.GuestName = HttpContext.Current.Server.HtmlEncode(txtGuestName.Text); if (ddlCompanyName.SelectedValue != String.Empty) searchParams.CompanyName = ddlCompanyName.SelectedValue; if (ddlCompanyType.SelectedValue != String.Empty) searchParams.CompanyType = ddlCompanyType.SelectedValue;
the code used to load parameter values
public void LoadParamValues(RecipientSearchParams searchParams) { if (!String.IsNullOrEmpty(searchParams.GuestName)) txtGuestName.Text = searchParams.GuestName; if (!String.IsNullOrEmpty(searchParams.CompanyName)) ddlCompanyName.SelectedValue = searchParams.CompanyName; if (!String.IsNullOrEmpty(searchParams.CompanyType)) ddlCompanyType.SelectedValue = searchParams.CompanyType; public interface IAudenceTab { bool ValidateSearch(); void InitializeSearch(ref RecipientSearchParams searchParams); void LoadParamValues(RecipientSearchParams searchParams); } private void PopulateGuestSqlParams() { if (!String.IsNullOrEmpty(GuestName)) { AddHashValue("GuestName", _GuestName); Description += String.Format("Guest Name {0}; ", _GuestName); } if (!String.IsNullOrEmpty(CompanyName)) { AddHashValue("CompanyName", CompanyName); Description += String.Format("Company Name {0}; ", CompanyName); } if (!String.IsNullOrEmpty(CompanyType)) { AddHashValue("CompanyType", CompanyType); Description += String.Format("Company Type {0}; ", CompanyType); } public List<Person> ExecuteSearch() { PopulateSqlParams(); MSSqlDBProvider db = new MSSqlDBProvider(); SqlConnection conn = db.GetConnection(); List<Person> pList = DataObjectProvider<Person>.GetObjectList("dbo.PersonNewsletterFilterSearch", CommandType.StoredProcedure, pHash, conn); return pList; } stored procedure used (@GuestName IS NULL OR p.FullName LIKE '%' + @GuestName + '%') AND (@CompanyName IS NULL OR p.ID IN ( SELECT Distinct compGuest.GuestId From CompanyGuest compGuest Inner Join CompanyDetail compDetail on compGuest.CompanyId = compDetail.PersonId where compDetail.[Name] = @CompanyName )) AND (@CompanyType IS NULL OR p.ID IN ( SELECT Distinct compGuest.GuestId From CompanyGuest compGuest Inner Join CompanyDetail compDetail on compGuest.CompanyId = compDetail.PersonId where compDetail.[Type] = @CompanyType)) AND
I have a code behind file which has only a few placeholders and literal. The gridview control and others are added in real time according to program conditions. I noticed that once in a while th eprogram stopped working because the .aspx file is changed and some of the place holders disappeared - Why? (the bolded lines disappeared once in a while)
I cannot get the Drag and Drop functionality of Web Parts is to work. I have a very simple test page with two WebPartZones.. In the OnInit method of the code behind I put the page in design mode. In the first zone I have a textbox.At runtime the text box renders as a web part. When I hover over the web part header my mouse pointer changes the 'move' pointer, but I cannot drag the item. I do not see it dragging and the part never moved. I am using Visual Studio 2010 with IE 8. I have tried IE8 in compatibility mode and regular mode. The results are the same. Here is the markup from my test page:
I have a Drop Down List which I need to bind to the database. Here is the situation. I am not using a SQLDataSource. It is built on the n-tier application. The datasource of the dropdown is referring to a method in the C#class. That method has a generic array list which populates information into the arraylist. The Arraylist is the parameter that is returned to the DropDown List.
I have also set the Text property of the Drop down list
I want to make a button that changes the value in a dropdown list (dropdown populated from SQLdatasource)This sounds strange i know but i have 4 dropdowns each hidden by panels, unless the preceeding dropdown's value is changed from it's initial value. So i make a selection from my first dropdown list & a postback occurrs triggering the next panel (and as such the dropdown list) to become visible, this occurs again until eventually my users will see 4 drop down boxes...(all required field vals etc)
I am now in process doing theme for my web application.
This is how i want my Theme work :Whenever user choose to change the theme, the whole web site theme should changed accrodingly.
Most of the examples that i find out online require to assign the theme in Page_PreInit event in every page. The theme name is store in session variable.
My concern is that is there anyway to assign particular theme to whole web site without having assing it to every page and store the theme into session variable.
I have a checkbox with autopostback property. I just want to ask because everytime I check the box It appears on the upper part of the page. How can I make it without changing its location when I check the box.