473,657 Members | 2,473 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

User Control With Drop downlist not maintain viewstate

1 New Member
Hi,

I am using the user control inside the repeater control which is having dropdownlist controls but while post back i need to bind the repeater every time so i can not take the selected of dropdown list.
How can i get the dropdownlist's selected value which is in side the user control

Thanks
Oct 3 '07 #1
1 1308
Shashi Sadasivan
1,435 Recognized Expert Top Contributor
Hi,

I am using the user control inside the repeater control which is having dropdownlist controls but while post back i need to bind the repeater every time so i can not take the selected of dropdown list.
How can i get the dropdownlist's selected value which is in side the user control

Thanks
Make the drop down list control a public one
or you can create a public property variable which contains the selected value of the drop down

cheers
Oct 3 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
1666
by: Markus McGee | last post by:
Hi all, I have a quick question...I believe. On my web page, call it page A, I have a drop downlist with runat server enabled. When the drop downlist change event occurs it repopulates a table depending on the value selected on page A. After I redirect page A to some other page, call it page B, and use the IE Back button to change my selection on the page A the page is forwarded to page B without rebuilding the table on page A and...
2
2034
by: Sam Kuehn | last post by:
There has been a lot of articles on how to load user controls at runtime in the Init() method. UserControl myControl = (UserControl)LoadControl(stringControl); I add the control in the Init() method so that the viewstate to works properly. What if I want to let the user select what control to display? For instance say I have a drop down list of user controls and want to load the control the user has selected? When the user selects a control...
7
1936
by: Smithers | last post by:
I have a non trivial ASP.NET Web application that implements its navigation system via a user control (menu.ascx) placed on every page. It is important to note that the user control that hosts the menu is injected into every page at runtime when the page is requested (i.e., it's not declared in any ASPX). The user control contains a menu that is dynamically populated and styled at runtime (fwiw: it's ComponentArt's Menu for ASP.NET -...
3
1307
by: J-T | last post by:
I have a aspx page which loaded different user contols based on the users' entries.In one of my child user controls I have a property like below: public String PostID { get { return (String) ViewState; } set
5
1302
by: serge calderara | last post by:
Dear all, I try to study Web user control .For that I have created a simple text box with button as a webuser control which has 2 properties. Then I drop my user control on a web page for testing. I have read that If we need to retrive Webuser control properties from the web page, we need to place the code in the PAge_Prerender event of the form which contains it. So what I have do is that I place that webuser control on a web page...
9
5303
by: McGeeky | last post by:
Is there a way to get a user control to remember its state across pages? I have a standard page layout I use with a header and footer as user controls. Each page uses the same layout by means of copy paste (I hear this will improve in ASP.Net 2 via master pages). When I navigate from one page to the next the header and footer user controls lose their state because they are effectively different instances of the user control. Is there...
3
1507
by: Joe | last post by:
Hello All, I am developing a webform which creates ArrayLists of people's names and addresses (the values are retrieved from an xml file) and dynamically drops a user control onto the webform and populates it with the required names. Once the user selects a name, the webform will then drop another user control (the same control) onto itself and populate it with the selected name's addresses. The user control is a combination of an...
1
2914
by: Joe | last post by:
Hello All, I have a user control which is composed of a label and a dropdownlist. In my code I add the user control to a placeholder on the webform. Now I want to be able to retrieve the selected value from the drop downlist when a user clicks a button server control. Here is the code that populates the user control and placeholder: Dim UControl As AugmentedDropDownList =
0
1268
by: xpnet | last post by:
Hi, I am using Mutliview control, and want to move a user control from one view to another view based on user selection. I can do this by placing a "Placeholder" control in each views. Based on the user selection, remove the control from the placeholder and add to annother placeholder as: Me.divViewHome.Controls.Remove(Me.DiySearchSide1) Me.divViewResults.Controls.Add(Me.DiySearchSide1) For the first time when moving the usercontrol to...
0
8397
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8827
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4315
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2731
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1957
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1620
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.