Last post May 21, 2008 01:47 PM by jkirkerx
Apr 28, 2008 10:47 AMfirstname.lastname@example.org|LINK
I am working on VS 2008 shell. In that I have to open aspx page in runtime and that page shoud have few custom properties. So our applicaton designer will design that page in runtime using our custom properties. Meaning that I have to create one aspx page
template which should have custom properties. I am able to crate custom control with custom propertis for button ..the same way I have to create aspx page with custom properties. When user select the page and see the properties window, he should be able to
see those custom properties for page also he shoud mask some of the existing page propertis.
I am not sure for which control we have to create custom propertis. Either document or form. I am not sure how to create custom controls for form, document and all.
your help is greatly appreciated.
Custom Validation Controls
web control properties
Custom Control properties child controls
custom server control
custom control extender
Custom controls custom control extender DefaultValue ajax asp.net
custom control events design
web custom control
custom control style
"Visual Studio 2005"
visual studio 2008
Complex User Control Properties
Custom Control in Master Pages
Apr 28, 2008 11:46 AM|Prof_Teancum|LINK
what you probably want to do is to create your own base class page that other pages can inherit from. You can specify custom properties for the page just as you would for a normal class in the code section. You would be able to reference the custom properties
in all your code behind pages. I don't think the designer will update to reflect them - though you probably don't need that anyway since it is quicker to use intellisense and tab-completion when coding using the text interface instead of the GUI.
If you need help with base classes and inheritance, let us know.
Apr 29, 2008 12:37 AMemail@example.com|LINK
Hi, Thanks for your response. but my need is I want to reflect that custom property in the design time also. Because in my application I am using VS Shell 2008 which is used to design the application at runtime. Means my applcation user will be design the
form using custom properties of the page at the runtime.
Apr 30, 2008 07:59 PM|jkirkerx|LINK
Since you made your control, and it's works in runtime, from what I read, you need to make the control work in design view, so your end user can program the properties of the control.
You have to detect design view and runtime, and in Sub or Void Render, detect and make the switch. Can't help you more because I think you have the wrong forum, and your asking about Server Controls for Windows Applications. I call the pages webforms for web
We make 2 Subs or Voids, 1 for run time and 1 for design view.
There are tons of posts in this forum on the subject, you should look through them for help.
May 21, 2008 09:38 AMfirstname.lastname@example.org|LINK
I am sorry , I menat web page only not windows form. sorry for using wrong phrase. I am not finding any posts for custom properties for aspx page. I tried pageBase class which will have cusom properties for page. But its refelecting the code behind file
not in design time. I need to accss those aspx page custom properties at the design time itself in properties window as like as other custom server control.Thank you for your attention. I appriciate your help.
May 21, 2008 01:47 PM|jkirkerx|LINK
Delete the RenderContents(ByVal writer As HtmlTextWriter)
And use this statement. This is a vb example - it detects design view, and forks the controls load sequence
Protected Overrides Sub Render(ByVal writer
If Not Me.Context Is Nothing Then
You design your control in RenderDesignMode until you get the look and feel you want. Then copy the code to OnInit or CreateChild. Add Sub OnLoad for your control logic, to populate data.
In RenderDesignMode, you have to manually render the control using the top level parent object you made. I use panels as control containers, and place this at the bottom of my code. panelContainer is my top level object.
This forces the Rendering of the control.