?
Solved

How to prevent Literal and Textbox control repopulating?

Posted on 2006-07-18
6
Medium Priority
?
520 Views
Last Modified: 2010-03-19
Hi,

I have a literal and a textbox on my form, the contents of the literal are set in the Page_load with no postback check. Viewstate has been disabled for both controls, yet when a postback is performed, the textbox retains it's pre-post value, and so does the literal control. ( I know that viewstate doesn't hold the textbox value, blah blah blah)

I could handle the textbox by setting it's text to "" on postback, but the literal control SHOULD be refreshing itself each postback.

How can I make the page behave as it does when first loaded?

Thanks for your time,

b
0
Comment
Question by:WillyCornbread
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17139121
>>with no postback check.
Why aren't you checking Page.IsPostBack before setting value?

Bob
0
 

Author Comment

by:WillyCornbread
ID: 17139219
I'm not checking, because I WANT to rebuild the literal regardless of whether the page was posted back, or the first access.

Thanks,

b
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17139389
Well, I can't see any answer from what you described.

Bob
0
 

Accepted Solution

by:
WillyCornbread earned 0 total points
ID: 17139491
After some further researd, I believe my problem is that the Page_load is handled PRIOR to any post-back events, so my data is not being changed until after the literal content is built.

I'll close this question.

b
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question