473,407 Members | 2,629 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,407 software developers and data experts.

placeholder proves problematic postback

I have a placeholder in a repeater, along with a textbox.

For each "repeat unit" I call the onitemdatabound method and decide
what I am going to put in the placholder, checkboxlist or
radiobuttonlist at the moment.

This is displayed (as a questionare) the user then ticks, selects, and
hits the "submit" button

On postback, what is stored in the placeholders is lost, and if i want
it back i have to rebind to the datasource, this apparently is by
design.

If i do rebind then i can read out what boxes were ticked, but the
rebind loses the values in the textboxes.

I am very frustrated, as I cannot imagine why this behaviour is
permitted, totally illogical and unfriendly. I also missed where this
is discussed in the docs for placeholders.

I need a solution that will either save the controls in the
placeholder, and on postback rebuild them, or let me read the 'old'
values in the textboxes before the data is rebound.

I dont even want the page re-displayed, preferably i would submit the
page to the server, it would read the data and enter it into the db
and throw up a "thanks" page.

Please help, or just send messages of support ;)

I dont use VS.Net, too poor.

Thanks
Fragg
Nov 18 '05 #1
1 1402
Well I will admit to being a total novice to this, but i got a slight
hint of a sniff of a clue that moving my data bind to page_init may
help so i did

and it did

I have NO idea why seems like crazy madness to me but there you go.

If you are having problems with dynamicaly loaded controls being
forgoten then just bind them in page init and everything works.

Fragg

Sub Page_Init()

QuestionList.DataSource=Questions.GetQuestions(Mod uleId)
QuestionList.DataBind()

End Sub
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)

End Sub
Nov 18 '05 #2

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

Similar topics

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...
1
by: Angel | last post by:
I have added controls to the placeholder control. All the controls that were added have EnableViewState = true including the placeholder. One of the controls has a button that performs a postback. My...
9
by: Anders K. Jacobsen [DK] | last post by:
Hi I have this that adds some usercontrol (UCTodays.ascx) to a placeholder foreach(A a in B){ UCTodays ucline = (UCTodays )LoadControl("UCTodays.ascx");...
1
by: Simon Wallis | last post by:
Hi, I have a PlaceHolder on a place, to which I add a DropDownList (using myPlaceHolder.Controls.Add(ddl). The user selects something from the DropDownList and posts the page. Now I try to get...
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...
3
by: Oren | last post by:
hi, How can I retrieve the Control (wucState.ascx) from the Placeholder at the even: btn_Click: //declaration at page protected wucState WucState1; -- my control .... private void...
2
by: Vishal Gupta | last post by:
Hi all, I have a placeholder control on an ASPX page. I dynamically add a few button control and label control to the placeholder from code - all is well with the world. But on post back the...
2
by: David | last post by:
I have a UserControl loaded into a PlaceHolder and I have a button there which is suppose to load another UserControl into the same PlaceHolder and hide the previous one. Why does the events of the...
0
by: F | last post by:
Hi, The funniest part of the problem described here is that I am not new to ASP.NET, but honestly here I have no idea about what's going on. I have a GridView with a data source that just...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.