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

Design Time Support

Hi..

I need to know in design time in ASP.NET inside a control (for ex), who is
the Page that contain him. I tried to use the Pae property or the Parent
property but they are NULL.
I need tha page type or namr or something like that.

Is it possible ??

Thanks a lot

Zviki.
Nov 18 '05 #1
2 1230
Zviki,

I don't think so. The problem is that the page is basically a handler and
the handler is not really running. the DesignTime is only simulating a page
and firing off a few select events on each control (OnInit, Render
specifically).

Your best approach is most likely to check for designtime mode and dispay
information specifically for that. You can do this by checking
HttpContext.Current for null - if it's null you're in design time.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
----------------------------------
Making waves on the Web
"Zviki Goldberg" <zv****@matrix.co.il> wrote in message
news:OI*************@tk2msftngp13.phx.gbl...
Hi..

I need to know in design time in ASP.NET inside a control (for ex), who is
the Page that contain him. I tried to use the Pae property or the Parent
property but they are NULL.
I need tha page type or namr or something like that.

Is it possible ??

Thanks a lot

Zviki.

Nov 18 '05 #2
Hi

I need to go the the resource of the ASP.NET page and update it in design
time. Therefore, I need the page type or the page name which the control is
in.

Do you have maybe other ideas ??

Thanks..
Zviki

"Rick Strahl [MVP]" <ri********@hotmail.com> wrote in message
news:ug**************@TK2MSFTNGP09.phx.gbl...
Zviki,

I don't think so. The problem is that the page is basically a handler and
the handler is not really running. the DesignTime is only simulating a page and firing off a few select events on each control (OnInit, Render
specifically).

Your best approach is most likely to check for designtime mode and dispay
information specifically for that. You can do this by checking
HttpContext.Current for null - if it's null you're in design time.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
----------------------------------
Making waves on the Web
"Zviki Goldberg" <zv****@matrix.co.il> wrote in message
news:OI*************@tk2msftngp13.phx.gbl...
Hi..

I need to know in design time in ASP.NET inside a control (for ex), who is the Page that contain him. I tried to use the Pae property or the Parent
property but they are NULL.
I need tha page type or namr or something like that.

Is it possible ??

Thanks a lot

Zviki.


Nov 18 '05 #3

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

Similar topics

0
by: Derrick | last post by:
Hello all; (I've posted this to the windowsforms.designtime and windowsforms.controls groups, but this group is far more active. My apologies to anyone who doesn't like being slightly off topic...
0
by: Dirk | last post by:
Hello, What is the the best approach to have design time support for a custom control derived from one of the standard controls in the toolbox. Let's say I derive from listview and I don't want...
2
by: Zviki Goldberg | last post by:
Hi.. I need to know in design time in ASP.NET inside a control (for ex), who is the Page that contain him. I tried to use the Pae property or the Parent property but they are NULL. I need tha...
4
by: jim | last post by:
I am trying to debug a user written web control and web control designer. I found an article “Building Windows Forms Controls and Component with Rich Design-Time Features” that describes how...
0
by: Christian H | last post by:
Hello, I've just created a WebUserControl that consists of a few other controls such as DropDownList, TextBox and Button. Based on the information entered in the DropDownlist, and TextBox, the...
0
by: onyxring | last post by:
I'm reposting this, because I had a bit of difficulty last time and think that it might have fallen through the cracks. If I'm posting to the wrong groups, please let me know. Surely someone has...
6
by: Brett Romero | last post by:
How can I add design-time support to a custom control in VS.NET 2005? Thanks, Brett
0
by: offwhite | last post by:
I have been trying to do this for a very long time. Unfortunately the docs are still only covering VS 2003 on MSDN, so now that I just figured it out I put together a tutorial to share. You can...
1
by: Mark Olbert | last post by:
Has anyone else noticed that the design-time support for databinding in custom controls in ASPNET2 sucks? At least for GridViews? So far I've spent going on two days trying to get the following...
8
by: tomsiw | last post by:
Hello, I am trying to create a user control which allows the user to enter a collection of items at design-time. Code example: public class MyControl : System.Windows.Forms.UserControl {...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, youll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.