473,387 Members | 1,592 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

code example for placeholder/user control and viewstate problem

I am using a placeholder in my aspx page for a control (ascx in a
separate file). I cannot capture the value of the dropdownlist on
postback in the control because according to what I read, the viewstate
is in a "special place" and is being overwritten. Please please tell me
how to access this special place!!!???!! Thank you.

I am using C#, by the way.

P.S. I have read several explanations that talk about the order of
processing but I REALLY REALLY need to see a piece of code.

Nov 18 '05 #1
2 5090
ItNerd wrote:
I am using a placeholder in my aspx page for a control (ascx in a separate file). I cannot capture the value of the dropdownlist on postback in the control because according to what I read, the viewstate is in a "special place" and is being overwritten. Please please tell me how to access this special place!!!???!! Thank you.

I am using C#, by the way.

P.S. I have read several explanations that talk about the order of processing but I REALLY REALLY need to see a piece of code.

Are you loading user control in Page_Load? If yes then move this loading code to Page_Init to enable ViewState of user control which was loaded dynamically to placeholder.
Nov 18 '05 #2
terrorix wrote:
ItNerd wrote:

I am using a placeholder in my aspx page for a control (ascx in a separate file). I cannot capture the value of the dropdownlist on postback in the control because according to what I read, the viewstate is in a "special place" and is being overwritten. Please please tell me how to access this special place!!!???!! Thank you.

I am using C#, by the way.

P.S. I have read several explanations that talk about the order of processing but I REALLY REALLY need to see a piece of code.


Are you loading user control in Page_Load? If yes then move this loading code to Page_Init to enable ViewState of user control which was loaded dynamically to placeholder.

THANKS!!

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: CoreyMas | last post by:
Hello everyone, I am in a bit of a dilema trying to write an HTML <br> tag into a panel or placeholder. Here is the situation I have 4 tables that represent 4 levels of data (level4 is...
4
by: patrick_a | last post by:
Hello, I am trying to insert multiple instances of a custom user control into a placeholder on an aspx page, based on the records retrieved from the database. I use the datareader to loop through...
0
by: dwhitford | last post by:
I'm using a placeholder control to dynamically add textboxes to the web page. When the page loads I dynamically create a set of textboxes give them an id and a value. When the page postback I...
2
by: Charlie Dison | last post by:
Hi there I can't believe this is so hard to figure out. I've drawn a placeholder control "phCategory" on my form in asp.net. In my load event I do this Dim txtCategories As New textbo...
1
by: ItNerd | last post by:
I am using a placeholder in my aspx page for a control (ascx in a separate file). I cannot capture the value of the dropdownlist on postback in the control because according to what I read, the...
0
by: shark | last post by:
I have a placeholder in a control that is in turn, used as a control in a placeholder in a form. I am getting a viewstate error so I believe I have to clear my placeholder before I load the...
1
by: Amir Ghezelbash | last post by:
Hey every body; first off let me say thanks every body..this place is great i have never came here with a problem and left without an answer..you guys are awsome any way i had a question...
10
by: Ben | last post by:
Hi, I made an application in classic asp (reservation of books and video stuffs for students) and want to migrate to asp.net. The user has to chose a date, then pushung on a submit button. The...
5
by: studio60podcast | last post by:
I have an ASP:Placeholder and I'm trying to populate with Label controls from the code behind after a button click, essentially creating a list of selections. But each time I click the button,...
3
by: Yourself | last post by:
Hi, I'm trying to post data to PayPal for a shopping cart, basically I want to replicate a form like the following, but create the variables dynamically from code behind: <form...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...

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.