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 > starter_kits_and_source_projects.internet_explorer_web_controls Tags:
Item Type: NewsGroup Date Entered: 7/7/2004 11:54:51 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 8 Views: 57 Favorited: 0 Favorite
9 Items, 1 Pages 1 |< << Go >> >|
mawster
Asp.Net User
Persist multipage pageview contents?7/7/2004 11:54:51 AM

0

Hello,

My app creates tabs and pages dynamically, works except I
cannot figure out why the contents of the pageviews will
not persist.

Ie: A dynamic label on a page, recreated in Init handler
will retain viewstate. Same label on a pageview will not.

Question: How can I make the content on a pageview persist
in standard asp.net convention, like it *should*, ie as
most other controls behave? Is there an easy way?

Would really appreciate help on this!

Best regards,

/mawi
Replies also sent to my mail greatly appreciated:
m(yup, a single m before the...)(at)mawi(dot)org
mawster
Asp.Net User
Re: Persist multipage pageview contents?7/8/2004 12:49:45 PM

0

Hello again,

I posted this question without code, here is the code.

Again, the problem is: The viewstate of a pageviews child
controls is not saved in the normal way, as it would be if the control were
child of a page.


Any clues as to how to resolve this in the best way are
greatly appreciated. If one could make a control child of
multiple parents I could use Denis Bauers placeholder, but
afaik that is not possible.

Notice that this will probably not run using vanilla ie
webcontrols code, due to the bug I've posted about recently.

/mawi

=== CODE === (save as aspx file in a webroot, put
"Microsoft.Web.UI.WebControls.dll" - preferably bugfixed -
in "bin" directory of that root):


<%@ Page language="c#" AutoEventWireup="true" %>
<%@ Register TagPrefix="iewc"
Namespace="Microsoft.Web.UI.WebControls"
Assembly="Microsoft.Web.UI.WebControls" %>
<script runat="server">
void Page_Load()
{
for ( int i = 1; i <= TabStrip1.Items.Count; i++ )
NewPV( i.ToString() );
}
private void addTab(object sender, System.EventArgs e)
{
String count = (TabStrip1.Items.Count + 1).ToString();
Tab t = new Tab();
t.Text = t.ID = "Tab_" + count;
PageView pv = NewPV( count );
t.TargetID = pv.ID;
pv.Controls.Add( new Label() );
( pv.Controls[ 1 ] as Label ).Text = "Persist this!!";
TabStrip1.Items.Add( t );
}
private PageView NewPV( String count )
{
PageView pv = new PageView();
pv.Controls.Add( new Literal() );
( pv.Controls[ 0 ] as Literal ).Text = "<H1>Page for tab
" + count + "</H1>";
MultiPage1.Controls.Add( pv );
pv.ID = "page_" + count;
return pv;
}
</script>
<html>
<body>
<form runat="server">
<asp:button id="addBtn" runat="server" Text="+Tab"
OnClick="addTab" />
<iewc:tabstrip id="TabStrip1" runat="server"
targetid="MultiPage1" />
<iewc:multipage id="MultiPage1" runat="server" />
</form>
</body>
</html>
mawster
Asp.Net User
Re: Persist multipage pageview contents? - OK7/9/2004 7:44:37 AM

0


Edited by SomeNewKid. Please post code between <code> and </code> tags.



Hello,

if anyone looked at the code I posted they would see that it was in error. Viewstate is indeed persisted.

Corrected and working code (although it does require the bugfix applied to the IE webcontrols I posted recently ):


<%@ Page language="c#" AutoEventWireup="true" %>

<%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %>
<script runat="server">
void Page_Load()
{
for ( int i = 1; i <= TabStrip1.Items.Count; i++ )
NewPV( i.ToString() );
}
private PageView NewPV( String count )
{
PageView pv = new PageView();
pv.Controls.Add( new Literal() );
pv.Controls.Add( new Label() );
MultiPage1.Controls.Add( pv );
pv.ID = "page_" + count;
return pv;
}
private void addTab(object sender, System.EventArgs e)
{
String count = (TabStrip1.Items.Count + 1).ToString();
Tab t = new Tab();
t.Text = t.ID = "Tab_" + count;
PageView pv = NewPV( count );
t.TargetID = pv.ID;
( pv.Controls[ 1 ] as Label ).Text = "Persist this!!";
( pv.Controls[ 0 ] as Literal ).Text = "<H1>Page for tab " + count + "</H1>";
TabStrip1.Items.Add( t );
}
</script>
<html>
<body>
<form runat="server">
<asp:button id="addBtn" runat="server" Text="Add Tab" OnClick="addTab" />
<iewc:tabstrip id="TabStrip1" runat="server" targetid="MultiPage1" />
<iewc:multipage id="MultiPage1" runat="server" />
</form>
</body>
</html>
Bill2Clone
Asp.Net User
Re: Persist multipage pageview contents? - OK7/9/2004 1:01:25 PM

0

mawster,

Thanks for posting the solution.
It will probably help those who try to initialize pageview components.

Can I put your code @ www.iewebcontrols.net?
Please register (of course it's free), and tell me if you agree.
I modified one or two things:

<%@ Page Language="c#" autoeventwireup="true" %>
<%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %>
<script runat="server">

void Page_Load()

{

for ( int i = 1; i <= TabStrip1.Items.Count; i++ )

NewPV( i.ToString() );

}

private PageView NewPV( String count )

{

PageView pv = new PageView();

pv.Controls.Add( new Literal() );

pv.Controls.Add( new Label() );

MultiPage1.Controls.Add( pv );

pv.ID = "page_" + count;

return pv;

}

private void addTab(object sender, System.EventArgs e)

{

String count = (TabStrip1.Items.Count + 1).ToString();

Tab t = new Tab();

t.Text = t.ID = "Tab_" + count;

PageView pv = NewPV( count );

t.TargetID = pv.ID;

( pv.Controls[ 1 ] as Label ).Text = "Persist this!!";

( pv.Controls[ 0 ] as Literal ).Text = "<H1>Page for tab " + count + "</H1>";

TabStrip1.Items.Add( t );

}

</script>
<html>
<head>
</head>
<body>
<form runat="server">
<p>
<asp:button id="addBtn" onclick="addTab" runat="server" Text="Add new Tab/Pageview"></asp:button>
</p>
<p>
<iewc:tabstrip id="TabStrip1" runat="server" targetid="MultiPage1" SepDefaultStyle="background-color:#FFFFFF;border-color:#AAAAAA;&#13;&#10; border-width:1px;border-style:solid;border-top:none;border-left:none;&#13;&#10; border-right:none" TabDefaultStyle="color:#aaaaaa;background-color:#EEEEEE;&#13;&#10; border-color:#AAAAAA;border-width:1px;border-style:Solid;&#13;&#10; font-weight:bold;font-family:Verdana;font-size:11px;height:21;&#13;&#10; width:79;text-align:center;" TabHoverStyle="color:blue" TabSelectedStyle="color:#000000;background-color:#FFFFFF;&#13;&#10; border-bottom:none"></iewc:tabstrip>
<iewc:multipage id="MultiPage1" runat="server"></iewc:multipage>
</p>
</form>
</body>
</html>

DNN skins Forum
Tressleworks modules
DNN & webhosting
IEWCtrls
mawster
Asp.Net User
Re: Persist multipage pageview contents? - OK7/11/2004 5:52:25 PM

0

Of course, I want to share it so many places is good.

I already registered, my usual handle is mawi. I registered here as mawi some time ago but I cant remember the password or email I used so I created a new account using my backup handle :)

/mawi
mawster
Asp.Net User
Re: Persist multipage pageview contents? - OK7/11/2004 5:59:24 PM

0

Oh, suggestions for your site: Post a downloadable build with bugfixes and the source code project Peter Bromberg made.

/mawi
Bill2Clone
Asp.Net User
Re: Persist multipage pageview contents? - OK7/12/2004 7:47:39 AM

0

Mawi,

I see no mawi or mawster registered user. And there are 5 swedish users.

"a downloadable build with bugfixes"
I'm gonna add a Report your bugs section in the website as I did here: view post 442835

"the source code project Peter Bromberg made"
I browse to aspsoft and eggheadcafe and found nothing.
Do you have a link towards this project?
DNN skins Forum
Tressleworks modules
DNN & webhosting
IEWCtrls
mawster
Asp.Net User
Re: Persist multipage pageview contents? - OK7/12/2004 9:01:44 AM

0

* you're right, I thought I registered but I did not, will do. sorry about that.

* I already added the bugreport to that post a couple of days ago. My suggestion was more to add the known bugfixes and publish a fixed build, at the site you have.

* Sure, here is a link to Peter Brombergs article with build project: http://www.eggheadcafe.com/articles/20030426.asp

/mawi
mawster
Asp.Net User
DEFINITE SOLUTION!7/28/2004 8:34:12 PM

0

The above is not completely satisfactory, please see the following threads for the last on this:



asp.forums post "Why control needs roundtrip to reaffirm eventhandler?"


and

solution at end of:
asp.net forums: How to remove dynamically created controls?

/mawi
9 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Adding Ajax Authors: Shelley Powers, Pages: 382, Published: 2007
Outlook 2000 in a nutshell: a power user's quick reference Authors: Tom Syroid, Bo Leuf, Pages: 642, Published: 2000
Pro Django Authors: Marty Alchin, Pages: 320, Published: 2008
Seam In Action: Covers Seam 2.0 Authors: Dan Allen, Pages: 624, Published: 2008

Web:
Present dynamic data with Telerik RadTabStrip and RadMultiPage We don't need to build the tabstrip or the multipage. This example shows how the tabs and pageviews can be dynamically generated, adding page content on the ...
Handling the Response from the Service Persistent cookies allow the user to remained signed in across multiple browser sessions. ... GetClearCookieResponse(out type, out content); Response. ...
Doubts persist about Obama birth certificate Nov 2, 2008 ... speculation and even multiple lawsuits challenging the Democrat candidate's ... The main reason doubts persist regarding Obama's birth ...
ASP - How Many Types of Cookies One such example is tek-tips.com and how you can persist your information ... only last for that page view and will not be persisted across multiple page views ... Page copy protected against web site content infringement by Copyscape ...
/branches/aelkner-journal-threading/src/cando/virginia/browser ... competencies persist across multiple page views. This allows the user ... 13, tal:content="string:${context/title} Competencies" ...

Multiple Instances of a user control on the same page - ng.asp-net ... Multiple Instances of a user control on the same page, > ROOT > NEWSGROUP ... Page view counter . ... Content page control clientID - ng.asp-net-forum . ... httpmodule persist data ยท passing values to user control ...












images for tabstrip do not show up in browser

correct display of webcontrols(multipage) using non microsoft browser

ie web controls compatible with .net framework higher than 1.x versions?

treeview onselectedindexchange client side event question

i cant run webcontrols it for the first time

can't place controls on multipage!

problem with xml generated before use with treeview web control

load a treeview from data set

delected selected node from treeview

treeview state

yet another treeview not working problem..

how to include internet explorer web controls in the tool bar

add node in front of children

caching treeview

tabstrip

treeview: set selectedindex via client script

individual node colors

free treeview

treeview collapsing

tree view error crashes ie only in windows 2000

treeview

tree images are not display at runtime

treeview problem in asp.net 1.1

error message creating treeview

ie controls (treeview) and web matrix

ie lower than 5.01 and .net

events no longer firing after adding multipage/tabstrip

can i get any .net developpped library with proper ui

treeview selectnode problem(any help sooner is appreciated)

tree view control scrolling

 
Search This Site:

 
  Privacy | Contact Us
All Times Are GMT