473,394 Members | 1,751 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,394 software developers and data experts.

WebPart Question

Hi,

We are exploring the new possiblities in ASP.NET v2.0.

I want to have a page, in this page I have one WebPartManager
3 zones and I want to dynamically add WebParts to 3 zones.

I chose Page_InitComplete event (as explained in PDC 05) to load
UserControls dynamically into WebParts and Add it to Manager.

I just tried putting a Calendar Control on the UserControl and it
looses the values on postback :( . Change in dates doesn't work
(in fact control is as good as created a fresh).

How can I stop this behavious ???

--
Best Regards,
Parag C Mehta
Dec 5 '05 #1
2 1386
I would step through the code and see where you are setting values. Most
likely that code is hit prior to your attempting to retrieve values. I have
seen this happen a lot in Page_Load, both in 1.x and 2.0.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***********************************************
Think Outside the Box!
***********************************************
"Parag C Mehta" <pa*****@gmail.com> wrote in message
news:e3****************@TK2MSFTNGP11.phx.gbl...
Hi,

We are exploring the new possiblities in ASP.NET v2.0.

I want to have a page, in this page I have one WebPartManager
3 zones and I want to dynamically add WebParts to 3 zones.

I chose Page_InitComplete event (as explained in PDC 05) to load
UserControls dynamically into WebParts and Add it to Manager.

I just tried putting a Calendar Control on the UserControl and it
looses the values on postback :( . Change in dates doesn't work
(in fact control is as good as created a fresh).

How can I stop this behavious ???

--
Best Regards,
Parag C Mehta

Dec 5 '05 #2
Hi Gregory,

It's not Page_Load because I do in Page_InitComplete. In Pre_Init I enabled
the personalization on webPart.

Here is the basic synopsis :

=> Pre_Init of the Page enable personalization
=> Page_InitComplete : Load GenericWebParts dynamically from UserControl.

I tried putting it in Page_Init, but same result. And if I load control by
checking the postback,
then control disappears altogether! Which I assume is right. But what
perplexes me is that
user control values aren't serialized at all.

Best Regards,
Parag.
"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamM> wrote in
message news:el****************@TK2MSFTNGP11.phx.gbl...
I would step through the code and see where you are setting values. Most
likely that code is hit prior to your attempting to retrieve values. I have
seen this happen a lot in Page_Load, both in 1.x and 2.0.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***********************************************
Think Outside the Box!
***********************************************
"Parag C Mehta" <pa*****@gmail.com> wrote in message
news:e3****************@TK2MSFTNGP11.phx.gbl...
Hi,

We are exploring the new possiblities in ASP.NET v2.0.

I want to have a page, in this page I have one WebPartManager
3 zones and I want to dynamically add WebParts to 3 zones.

I chose Page_InitComplete event (as explained in PDC 05) to load
UserControls dynamically into WebParts and Add it to Manager.

I just tried putting a Calendar Control on the UserControl and it
looses the values on postback :( . Change in dates doesn't work
(in fact control is as good as created a fresh).

How can I stop this behavious ???

--
Best Regards,
Parag C Mehta


Dec 5 '05 #3

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

Similar topics

0
by: J. Jespersen | last post by:
Hi people, I fiddling with webparts, and have created my own custom webpart from scratch. The webpart itself is contained in a myPart.dll I have two different sites. SiteA and SiteB. Both are...
3
by: DexHex | last post by:
Hi, I am stumpt. Is there anyway to set the background image on a webpart title?
2
by: Mats Lycken | last post by:
Hi, I have a question about webparts in master pages. If I add a webpart to a webpartzone located in a master page will that webpart be available to all .aspx pages that uses that master page or...
0
by: lu2vik | last post by:
Hello, I would have a question about webpart parameters. Where are they stored when I close or minimize a webpart ?? And which tables are used to webpart with the tools aspnet_regsql.exe ?...
0
by: arthernan | last post by:
I have an almost finished page that uses webparts. And this is the expected functionality. A logged on user hits a button and the button opens a WebPart. Then te user logs off, next time he logs on...
2
by: arthernan | last post by:
I have an almost finished page that uses webparts. And this is the expected functionality. A logged on user hits a button and the button opens a WebPart. Then the user logs off, next time he logs...
3
by: Jav | last post by:
I create a UserControl (.ascx), and then change it in code to: Inherits System.Web.UI.WebControls.WebParts.WebPart expecting that it will now be treated as a WebPart. But this immediately...
2
by: MrCrool | last post by:
Hi I am trying to develop WebParts that will interact with each other to make up a highly customizable "system", but I am having trouble with the order in which the webparts connect and...
0
by: Manpreet | last post by:
Hi, I have a web part page with a toolbar webpart and a grid webpart. In the toolbar, I have menu-items to update a field. For selecting the value of the field I have another asp.net webform...
4
by: Arnab das | last post by:
I am working in asp.net webpart.I want to show the delete warning message in a modal popup. How can I achieve this?
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.