CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 8/16/2003 12:27:17 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 5 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
baura
Asp.Net User
Control recreation based on property8/16/2003 12:27:17 PM

0/0

Hello all,

i dont know if this is possible but i cannot find an alternative
way to acomplish something like that.

lets assume we have an aspx page where some custom controls are placed, for example
<%@ page %>
<%@ register control tagprefix="uc assembly="test" %>
<uc:container runat=server>
<controlA/>
<controlB/>
</uc:container>


The custom controls (uc:container) parses controlA and controlB with
a ControlBuilder, which returns the type of the controls,
and adds them to the controlcollection. The
container also adds another controlC to the container in CreateChildControls
or Onitit, so the Controllcolletion look like this after all and is send to the
browser:
<uc:container>
<controlA/>
<controlB/>
<controlCreateChildA/>
</uc:container>

okay, now comes the tricky part. The User has a CommandButton
on the page which sets some properties for the custom control container.
The property uses setter and getter so there could be calls to
refresh/rebuild the control.
For Example, if the user sets the property "RenderAlternative"
of the control to true, i want to exchange the inner controls of
the container to something like:
<uc:container>
<controlC/>
<controlD/>
<controlCreateChildX/>
</uc:container>

I see two steps to acomplish this:

1) Use another Controlbuilder (if RenderAlternative==true), or
check the variable in the controlbuilder and return another type if
variable== true
2) the same way in CreateChildControls:
protected override void CreateChildControls() {
if (RenderAlternative==true)
this.Controls.Add (new controlCreateChildX");
else
this.Controls.Add (new controlCreateChildA");

The problem in 1) is that in the ControlBuilder i have no access
to the property of the control.

I got it to work with 2), but the problem
here is that when the property is changed via the
LinkButton, the page is already rendered and the result is
rendered until the next "postback" (the user clicked twice).

Does somebody has some hints how to manage this?
I really would appreciate any help on this how this could be solved.
I see no way for first step (use another controlbuilder), for the second i
could imagine to clear the control and to create the childs again on the first
postback, so that CreateChildControls() is called again. However
i didnt get it to work.

Thanks for any response,
Achim
baura
Asp.Net User
Re: Control recreation based on property8/21/2003 10:20:11 AM

0/0

hm, i thought i found the solution using Server.Transfer to transfer to the same page again.
Then i could access the properties from the calling page through Context.Handler.
So there is the possibility to render the page and reflect the values of the properties in
Page_Load() or CreateChildControls().

However now i have the problem that the TreeView control, where the properties are set, does loose the viewstate. I tried to pass the viewstate from one page to another using the same way as described (Server.Transfer->Context.Handler) but it didnt work. Any ideas to this?
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Outdoor Recreation in America Authors: Clayne R. Jensen, Steven Guthrie, Pages: 373, Published: 2005
Ecological Economics and Sustainable Development, Selected Essays of Herman Daly: Selected Essays of Herman Daly Authors: Herman E. Daly, Pages: 270, Published: 2007
Applied Stream Sanitation Authors: Clarence J. Velz, Pages: 808, Published: 1984
The Geography of Tourism and Recreation: Environment, Place and Space Authors: Colin Michael Hall, Stephen Page, Pages: 427, Published: 2006
The Geography of Tourism and Recreation: Environment, Place, and Space Authors: Colin Michael Hall, Stephen Page, Pages: 309, Published: 1999

Web:
Accident hazard evaluation and control decisions on forested ... of hazard control programs for recreation sites will be. described in a forthcoming report. ..... figures are based on property losses of recreationists ...
Reservoir-Based Recreation and Local Government Finance Table 4 summarizes the impact of reservoir-based. recreation,. including the efed. of. public acquisition. on assessed valuation. of. real property, ...
Massachusetts Department of Conservation and Recreation Bureau of ... Curtin Road, Bryan Road and Department property lines, slash will be removed ... control features will be added, such as water bars and broad based dips to ...
Limiting Impact of Recreation on Water Quality This fact sheet describes BMPs you can adopt on your shoreland property to .... Fees for many recreational licenses help enhance Minnesota's water-based ...
Bush Admin. Attacks Private Property and Recreation: Oct 31 2005 This kind of abuse of private property and recreation users cannot be .... trying to gain control over the nations recreation lakes and other Federal lands . ...
FREQUENTLY ASKED QUESTIONS ABOUT THE COASTAL CONSTRUCTION CONTROL LINE resulting in loss of this natural resource and its important values for recreation, upland property protection and. environmental habitat. ...
Recreation and aesthetics - Forest*A*Syst A legally-labeled, safe and effective herbicide that is known to control ... recreational rights usually charge at least enough to pay their property taxes. ...
Expert Systems with Applications : Fuzzy modeling approach based ... Fuzzy modeling approach based on property location quality for grading ... 1998) developed models of urban development using fuzzy-logic-control for ...
TOWN OF BRUNSWICK of the town, or on property not owned or under the control of the town. The commission shall. communicate with other recreational user groups to coordinate ...
WATER BASED RECREATION PROGRAMS construction or renovation of a dam for flood control and water supply and/or ... also identifies local water-based recreation issues in the Basin Plan ...

Videos:
Vote Green Party in Aberdeen New Jersey 2007 Vote Green Party in Aberdeen, New Jersey '07! GREEN PARTY 10 KEY VALUES: Grassroots Democracy Social Justice Ecological Wisdom Non ...
4 Bed, 3.5 Bath 4,099 Sq. Ft. 6.34 Acres Elma, NY 14059 MLS ID # 282713 Single Family Property County: ERIE Year Built: 2004 4 total bedroom(s) 3.5 total bath(s) 3 total full bath(s) 1 total half ...
Country Retreat, City Comforts! - Real Estate New Zealand This superb property is a shining example of excellent planning, care and construction. A huge 222 m2 Lockwood home built in 2004, with zincalum ...
Victory day *6 medvedev is sabstituted personage from islamic regime,the same as some nominee in american election. look further themes:main method of islamic ...
Bowie City Council Meeting 10/3/06 City of Bowie 2614 Kenhill Drive Bowie, Maryland 20715 REGULAR CITY COUNCIL MEETING TUESDAY. OCTOBER 3. 2006 CALL MEETINGTO ...
"Why Save Jake Long?" - Review of American Dragon Jake Long READ FIRST- This vid is a review about American Dragon Jake Long. Why this show should be saved? What do I think about it? This video contains my ...
Ventura Board of Supervisors Meeting Ventura Board of Supervisors Meeting
Poison ivy: double the size, double the trouble MILTON -- Poison ivy on steroids? It's serious science, but the weed wags are having a field day. Even the plant physiologist who predicts a ...
REC #175 Cascading Style Sheets level 2 CSS2 Specification http://www.w3.org/TR/1998/REC-CSS2-19980512 :etc.) control over presentation. Note. This is a semantic change since CSS1. In CSS1, author ...
Full Focus: The Politics of Pete Wilson Series (encore) March ... Jerry Sanders is San Diego's new strong mayor, but is he the first? On Thursday's Full Focus, meet the man some call the city's first real strong ...




Search This Site:










how to clear log for schedule

3.0.9 after upgrade completed

img source proglem

dnn & blog websites

client-side caching of htc files

is using impersonation complex if in hosted environment?

permissions needed for aspnet account to access aspnetdb

asp:checkbox - adding onchange attribute results in a <span> wrapper...

dnn 3.0.4 - help debugging this great product

how are web parts persistant?

treeview

opml list problem

how do i set iis to run on the asp.net 2.0 beta 2

changing authentication mode msde problem

geekspeak sample

enterprise library for .net framework 2.0 security problem.

remote host installation questions dnn212

"links" module

securing arbitrary non-asp.net content

wrap tabstrip

site was working, but now login and logout error

forms authentication - allow resources pre-login

master pages and css layout problem

a module inside a module ??

css url's not working in master pages

location of module on page

how can i add the datagrid control

a fun little container

when will .net framework 2.0 & vs2005 be officially released ?

help with designer.vb files

 
All Times Are GMT