CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 9/19/2004 3:12:53 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 4 Views: 171 Favorited: 0 Favorite
5 Items, 1 Pages 1 |< << Go >> >|
Wee Bubba
Asp.Net User
composite control viewstate problem9/19/2004 3:12:53 PM

0

hello i am having a problem with a composite control i have developed and nobody as yet can help me solve this.

basically multiple instances of my control work ok on web page. but if i put those instances inside placeholders then change the placeholders visibility depending upon user selection then my listboxes are losing their state I think

i have put a .zip file here: http://www.fidgetbrain.com/test/control.zip
it contains my control code, a dll and 2 web pages. 1 works the other uses placeholders and you will see my listboxes will lose their state.

can anyone help me please? thanks.


master4eva
Asp.Net User
Re: composite control viewstate problem9/20/2004 1:38:50 PM

0

ASP.NET does not save state of controls whose Visibile property is false. What you can do is introduce a new property onto the PlaceHolder which controls whether or not to render the children.

public class MyPlaceHolder : PlaceHolder {
public bool ToRender {
get {
object o = this.ViewState["ToRender"]l
return (o != null) ? (bool)o : true;
}
set {
this.ViewState["ToRender"] = value;
}
}

protected override void Render(HtmlTextWriter writer) {
if (this.ToRender) {
base.Render(writer);
}
}
}

-- Justin Lovell
Wee Bubba
Asp.Net User
Re: composite control viewstate problem9/20/2004 1:59:39 PM

0

thanks justin i will try this out tonight. i will reply tomorrow morning to let you know how i went on. hopefully fingers crossed this will fix it!


Wee Bubba
Asp.Net User
Re: composite control viewstate problem9/20/2004 6:33:17 PM

0

what can i say. you are a leg end. :)

its taken me ages to find a solution to this problem. and i wouldve never come up with your solution so im real glad i posted.

thanks a lot.

martin


master4eva
Asp.Net User
Re: composite control viewstate problem9/21/2004 3:57:53 PM

0

No problem, Martin.
-- Justin Lovell
5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Developing Microsoft ASP.NET Server Controls and Components Authors: Nikhil Kothari, Vandana Datye, Pages: 689, Published: 2002
Developing and implementing Web applications with Visual C# .NET and Visual Studio .NET Authors: Amit Kalani, KIRK HAUSMAN, Priti Kalani, Pages: 555, Published: 2004
Pro ASP.NET 3.5 Server Controls and AJAX Components Authors: Rob Cameron, Dale Michalk, Pages: 740, Published: 2008
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew Macdonald, Mario Szpuszta, Pages: 1288, Published: 2005
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005

Web:
Composite Controls and the Missing View State re: Composite Controls and the Missing View State. Gravatar I just want to clarify this to everyone since i've also wasted hours on this particular problem . ...
Managing Viewstate of childcontrols in a composite control - ASP ... The control renders beautifully, but I'm having a problem .... The issue is, just because a control is tracking viewstate doesn't mean that ...
ViewState not restoring in composite control (ASPNET2) I think the problem in your composite control is likely due to you set the ... you want them to be persisted or tracked by viewstate ) after ...
CodeProject: Managing ViewState, Rendering and Events in Composite ... Sep 23, 2005 ... Preserving ViewState of embedded server controls. This drove me crazy and consumed ..... got problem with my composite custom web control. ...
ViewState Problem with Composite Control - ASP.NET Building Controls ViewState Problem with Composite Control ASP.NET Building Controls.

Problems with ClientID on Composite Control - ng.asp-net-forum ... I am having a problem with a composite control. .... Object state = ViewState[ " SomeImportantProperty" ]; if ( state != null ) { ...
Private variables versus ViewState... - ng.asp-net-forum.windows ... When I create a custom control, I always face the problem of having ... Because they don't use viewstate, changes to these properties are not kept around for the next postback. ... composite web control embedded image ...
Problem with databound composite control - ng.asp-net-forum ... Problem with databound composite control, > ROOT > NEWSGROUP > Asp.Net Forum ... is to store the number of records you bound to your datalist in ViewState. ...
UpdateProgress in Composite Control Throws Error - asp.net_ajax ... I have added a Composite Control to my page's code behind which contains an AJAX ... I keep getting an error that states that script controls can't be .... viewstate and updatepanels · dnd with latest release (april) ...
Inherit LinkButton, trying to make a simple control... - ng.asp ... constructing a datalist-type control. composite control viewstate problem · google toolbar, yahoo toolbar, how about my toolbar ? ...






creating a read-once configuration file

activex control

login

maintaining indent during render

setting custom property on page at design time

error on instantiation

create a custom repeater control (with conditional templates)

graphics and asp.net

problem with usercontrols event handlers please help! (advanced)

building composite control problem , please help

web hosting for .net 1.1 and mssql server

control arch. questions.

exposing properties of custom page in the ide

problem with validator within composite control

dotnetpark hosting problem

handling events in custom controls

server control design view

please help with server control

derived class with new eventhandler, and it doesn't fire!

control to validate does not produce correct name

getting my web form on the internet

problem with the active-x(ocx) control--it's urgent

expandableobjectconverter

itemplate's instantiatein not firing

custom control appears to interfere with viewstate

optimizing toolboxbitmapattribute

questions for 1and1.com clients only

custom treenode lost after postback

proper way to register client-script with a sub-classed validator

creating a provider model

   
  Privacy | Contact Us
All Times Are GMT