Creating .Net custom server controls and .Net pages programatically
Thanks a lot for reading this and greatly appreciate your inputs
I am writing a webinterface that lets users configure options that'll create an interface for them and generete the webpage. So I am having to programattically create custom server controls and .Net page with code behind to support the functionality.
Are there APIs in the .NET SDK that let you do this. Any pointers would be greatly helpful
Thanks a lot
Controls on the fly? Or Create code on the fly? I think it is the latter so here we go - look at the following namespaces:
* System.Reflection.Emit - gen...Usercontrol vs Custom Server Controls, Any need for Custom Server Controls
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...Custom Server Control Vs Web Parts, Any need for Custom Server Control
I've just posted a similar question on why you need server controls when you can pre-compile usercontrols and redistribute them.
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 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.
Shows how to combine existing controls into a new control using class composition.
ASP.NET so rocks! Making page components extensible objects is such a great idea! I love it....how to add a server control to a page from other server control
I have a control that needs to be added at a precise location on a web form using a server control i designed. I tried to add the control using this.Controls.add(controlName) but its just appending to the existing control. Is there a way to add a control to another control at a precise location?
I think adding it to a string builder is a feasible option for me, but I guess I cant do that. any suggestions as to how to implement it please?
in one control you add PlaceHolder, And Create one Public property which return PlaceHolder..
then when you add the control in Web For...How to create custom properties for aspx page which should refelect in design time properties window itself.( as like as custom server control).
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 ...Overriding Visibility on Custom Server 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...Custom Control: Calling a function on calling page FROM a custom control ? help !!
I have a custom control placed on many pages, to make things simple, basically what I want to do is Call a function on the calling page from the custom control ieAnyone have any ideas, simple solution would be good !! This is the code I have myControl.ascx.vbPublic Partial Class myControl Inherits System.Web.UI.UserControl Protected Sub testButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles testButton.Click 'call save function on PersonalDetails.aspx.vb &...Overriding width property on a custom server control
I have a custom web server control that consists of three dropdowns. I am trying to override the Width property and set it to a default width of 128 pixels. The property is defined as follows:
<Bindable(True), Category("Appearance"), DefaultValue("128px")> Overrides Property [Width]() As Unit Get EnsureChildControls() Return mWidth End Get
&n...Custom Server Control does not exist on page load
Hello. I've been struggeling with this for quite some time now and really need some help.I've been building custom server controls for some time and have some bits of knowledge missing that is causing me som problems.Here's the situation. I built a custom server control that returns a control that consits of an ASP.NET Textbox, Ajaxcontrol toolkit watermark extender, and image and a bunch of other stuff. The end result being a "Filter TextBox" that is used to apply filters on GridViews. The problem is that when the gridview OnLoad event fires to ...Custom server control
I am trying to create a simple generic pager control. I want to get the
current page index from the querystring of the parent page that
contains this pager control.
I built the control and try to drop it on an aspx page, it shows an
error. It's because of this line in the render method (no error if I
comment this line out), where I retrieve the current page index
from the page querystring. Like this:
The error is 'object reference not set to an instance of an object'.
There is no request object or parent page or querystring at design...Custom Server Control launching new page
I am developing a new custom server control, my first. It is essentially a table that displays information about a server. What I want to do is to include in the control a link to open a new web page to perform a task, such as pinging the server. So you would click on an icon in the server control and a new window would popup displaying the pinging results in it. I would like to keep this "sub page" within the server control itself. I know I could just create a new web page and insert a link into my control.
Can anyone tell me the best practice for distributing custom controls or controls that have been developed from inheriting server controls?
I am curious how other companies support a custom library of objects developed by developers within an enterprise.
At my company we follow the naming standards put forth by Microsoft: CompanyName.AppName.LayerName
Say I developed a Drop Down List that is used to display every year from 2004 to DateTime.Now in ascending order from inheriting the Web Server Control Drop Down List. After a committee of other developers have tested and app...