How to create custom properties for aspx page which should refelect in design time properties window itself.( as like as custom server control).
Hi.
I need to create the custom properties for aspx page itself where those custom properties should refelet in the properties window at the design time as like as other custom server controls. I tried pageBase class which will have cusom properties for page and inherited that pageBase to my aspx 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.I appriciate your help. [FYI: my scenerio is customer ...
Dragging controls in to a custom control at design time
I am creating a custom control that will contain a panel so that developers can drag other controls into it at design time. If I create a control that inherits from Panel this works no problem. But I need a composite control that may contain more than one Panel and this does not seem to work. I'm assuming I need to hard code support for dragging in controls. Does anyone have any ideas??...
Custom server control developement-panel like control
Dear all,
i am developing a custom composite server control. it consists of buttons, image controls in it. along with this. i would like to add one more control like a panel, so that the developers can drag and drop any web server control over my custom web server control in the design time. is this possible. if so how should i go about it.
regards,
sundararajan.sSundararajan.S
yes it's possible, you have to implement a designer class inherted from "TemplatedControlDesigner"
Hi,
thank you. can you please throw some more light on the same. any samples.
regards,...
Can we use existing Server Controls to create Custom Controls?
Can we use the existing ASP.Net Server Controls to create Custom Controls?
I am able to use HtmlTextWriter to make my Custom Controls. I want to be able to add regular ASP.Net server controls to create my Custom Controls. Is this possible? Can anyone provide a sample?
Basically, you just need to inherit the control you want to use, like this:
Public Class MyControl Inherits System.Web.UI.WebControls.TextBox
Then you can override the methods you want and add code as needed.
Peter BrunoneMS MVP, ASP.NETFounder, EasyListBox.comDo the impossible, and go home early.
The str...
Creating Custom Controls With Custom Controls Inside Of Them
Hello, I am trying to create a custom control for creating tabs. The idea is that our designer can just use the control tags to generate the tabs. The problem that I am running into is that I want to be able to have a custom control that allows any number of child custom controls. So there would be a TabContainer Control, and within that there would be any number of tabs. The idea is similar to how an asp:DropDown list can have any number of ListItems within them. Here is my code, any help is appreciated. 1 <!-- TAB CONTAINER -->2 <%@ Control Language=&...
Custom Server Control Made of Custom Controls?
I'm giving myself a crash course in custom server controls, and I have a quick general question.
Can I have a custom server control that is composed of other server controls I created.
I'm pretty sure the answer is yes, but I want to be positive.
Yes
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcondevelopingcompositecontrols.asp
Shows how to combine existing controls into a new control using class composition.
-ron
Thanks!
ASP.NET so rocks! Making page components extensible objects is such a great idea! I love it....
Usercontrol vs Custom Server Controls, Any need for Custom Server Controls
Hello
I'm new to ASP.Net so this is probably a stupid question but, is there any need to create customer server controls now that you can pre-compile usercontrols into a dll and thus easily share between applications?
This blog post from David Ebb describes how to do it and the restrictions he note don't seem that bad (other than being able to embed resources such as images in the dll). http://blogs.msdn.com/davidebb/archive/2005/10/30/487160.aspx
His article desribes the techniques for ASP.Net 2.0 and he suggests that there will be further improvements in .Net 3.5 in this ar...
how to have both server controls and html controls rendered in a custom control?
I have a custom control in which there is an html text box.when you click on it , a div containing a table is appeared and according to what you select in that table a text is set to the text box.
It works fine but the problem is: as the text box is an html element it doesn't have viewstate and when a post back occures in the page its value disappeares.I tried a hidden field to keep its value.again there is another problem : I put this custom control in a usercontrol and put the usercontrol in a multiview and by clicking on a button this view is selected and by clicking another bu...
Design-time problem with TableStyle property of custom control
Hi all,I've been writing custom menu control (inherited from HierarchicalDataBoundControl). Everything (both run-time and design-time) worked just fine, until I added new property like this:
private TableStyle tableStyle; [Category("Styles")] [PersistenceMode(PersistenceMode.InnerProperty)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public virtual TableStyle Tabl...
Custom Server Control Vs Web Parts, Any need for Custom Server Control
Hello
I've just posted a similar question on why you need server controls when you can pre-compile usercontrols and redistribute them.
http://forums.asp.net/p/1397433/3010100.aspx#3010100
I've seen lots of (usercontrol vs web part) but not much on web part vs custom server control.
According to the MSDN site you can put web parts onto a normal asp.net page outside of a web part zone and they behave just like custom server controls. So, if you are creating a bunch of controls for redistribution to customer asp.net sites and/or SharePoint sites why don't you just create Web Par...
problems listenening to events on a custom server control from another custom server control
Hi all,I am having problems listening to events on one of custom server controls(AddBookmark) from another custom server control(BookmarkList). The listener or the BookmarkList control has a property that can be set to the AddBookmark control (string at design but the reference is obtained at run-time). I am able to get a reference to the AddBookmark control and add a listener to it on the BookmarkList control on the OnPrender of BookmarkList. But the problem is that when the events on AddBookmark gets fired, the listener added from the BookmarkList is no longer present and the listene...
Custom Control within a Control Control
I am developing a custom controls that will render headers for different web sites. Within these controls, I want to place another custom control that will change the language. I created the language control and had it implement IPostBackDataHandler. This control works fine if I drag it on a new web form, but if I tell a header custom control to render it problems occur. The Language Selector custom control does not have a Page member anymore and the event handlers do not work. Does anyone have any experience with doing something similiar? Anyone have any suggestions?
Thanks,
...
Custom Control within a Custom Control
I have two individual custom controls say custom cc1 and cc2. cc1 is communicating to cc2 using event delegate mechanism.I have tested the behaviour by dropping cc1 and cc2 onto a Web Page and it works fine. I want to create a third custom control say cc3 which should contain both cc1 and cc2. So that if i drag and drop cc3 onto a Web Page i can acheive exactly what i am doing above.
The problem is that i am not sure how to call/register a custom control within a custom control ? Any clue ?
Thanks!!
Hi,
Do you mean adding custom control to custom control? I think you can use the same wa...
Proper way to add to Control collection from a custom server control?
Hi there,I'm creating a custom server control inheriting from TextBox. If a property ("IsRequired") indicates so, I want to add to a RequiredField validator to the mix. Below is what I am doing, though I get the exception "The control collection cannot be modified during DataBind, Init... etc."So how would be the proper way to do it?Thanks a lot, -Benton---------------------------------- using System;using System.Drawing;using System.Web.UI;using System.Web.UI.WebControls;using System.ComponentModel;using RequiredVal = Microsoft.Web.UI.Compatibility.RequiredFieldValidator;namespace...