I am working on a Customer Server Control that extends another control. There is no problem with attaching to other controls on the form.
in vb.net: Parent.FindControl(TargetControlName)
I would like to pass a method to the control in the ASPX markup.
for example: <c:MyCustomerControl runat=server InitializeStuffCallback="Initializ...
I'm implementing a custom control and in this control I need to write a bunch of links to the current page, each one with a different query parameter. I need to keep existing query string intact, and add (or modify the value of ) an extra query item (eg. "page"):
"Default.aspx?page=1"
"Default.aspx?page=2"
"Default.aspx?someother=true&...
OK, I am not sure if the title it completely accurate, open to suggestions!
I am in the process of creating an ASP.NET custom control, this is something that is still relatively new to me, so please bear with me.
I am thinking about the event model. Since we are not using Web Controls there are no events being fired from buttons, rathe...
Hi There.
I am in the process of beginning work on several ASP.NET custom controls. I was wondering if I could get some input on your guys/girls thoughts on how you apply styling to your controls.
I would rather push it so CSS, so for the few controls I have done in the past, I have simply stuck a string property which allows you so ty...
On my journey into the depths of custom ASP.NET control development I am obviously getting my head around the ASP.NET PostBack model and how it affects control development.
I understand that controls have no "lifetime" in ASP.NET, and therefore must be re-initialized on each and every page load. We overcome this by persisting the object...
I'm trying to create a server control, which inherits from TextBox, that will automatically have a CalendarExtender attached to it. Is it possible to do this, or does my new control need to inherit from CompositeControl instead? I've tried the former, but I'm not clear during which part of the control lifecycle I should create the new in...
I'm just getting started with Custom User Controls in c# and I'm wondering if there is any examples out there of how to write one which accepts nested tags. For example, when you create an "asp:repeater" you can add a nested tag for "itemtemplate".
Any help appeciated!
Cheers
...
I'm looking to do something akin to
<cstm:MyControl runat="server">
<myItem attr="something" />
<myItem attr="something" />
</cstm:MyControl>
What's the bare bones code needed to pull this off?
Rick's example shows something akin to
<cstm:MyControl runat="server">
<myItems>
<cstm:myItem attr="something" />
...
Part of the series of controls I am working on obviously involves me lumping some of them together in to composites. I am rapidly starting to learn that this takes consideration (this is all new to me!) :)
I basically have a StyledWindow control, which is essentially a glorified Panel with ability to do other bits (like add borders etc)...
I have built a number of asp.net servercontrols into a class library, & I would like them to be grouped a certain way when the other members of my team reference my dll. Is that possible? How?
...
Can anyone recommend a dropdownlist control for asp.net (3.5) that can render option groups? Thanks
...
I have been working on a ImageRotator control and finished weeding out any oddities with it tonight, and it works great. However, there is one thing that is bugging me with it. It doesn't display anything at design time (I just get the image placeholder).
I have been Googling, and came across a good article from Rick Strahl (as always),...
I am having a very hard time finding a standard pattern / best practice that deals with rendering child controls inside a composite based on a property value.
Here is a basic scenario. I have a Composite Control that has two child controls, a textbox and a dropdown. Lets say there is a property that toggles which child to render.
so:
...
I am trying to create a custom control that a "gridview" like control but specifcally for business objects that implement certain custom interfaces.
In doing this I have come across the following problem.
I have a control that I have disabled viewstate on (and I don't want to re-enable it) and it has a child control that I want viewst...
Greetings!
I've created a custom button class to render the following:
<span class="btnOrange">
<input type="submit" id="ctl00_MainContent_m_GoBack" value="Back" name="ctl00$MainContent$m_GoBack"/>
</span>
However, it renders like this instead (note the extraneous "class" attribute in the INPUT tag):
<span class="btnOrange">
...
Hopefully some Custom Control Designers/Builders can help
I'm attempting to build my first custom control that is essential a client detail collection form. There are to be a series of elements to this form that require various styles applied to them. Ideally I'd like the VS 2005/2008 properties interface to be able to apply the CSSClas...
Is there a good way to add a .swf programatically to a panel on an asp.net page - ie: I know i could just insert the html tags:
ie:
<object type="application/x-shockwave-flash" data="yourflash.swf" width="" height="">
<param name="movie" value="yourflash.swf">
</object>
But is there an existing .net or free FLASH component already t...
This works, but is it the proper way to do it???
I have a custom server control that has an [input] box on it. I want it to kinda mimic the ASP.NET TextBox, but not completely. When the textbox is rendered i have a javascript that allows users to select values that are then placed in that input box.
I have a public text property on t...
I have a custom control that exposes a property. When I set it using a fixed value, everything works correctly. But if I try to set its value using the <%= %> tags, it goes a little whacky:
<cc:CustomControl ID="CustomControl" runat="server" Property1='<%= MyProperty %>' />
<%= MyProperty %>
When this gets rendered, the <%= MyProper...
Hi.
In A.ascx I have one DropDownList and one DIV. The DropDownList is populated dynamically.
How do I load B.ascx into the DIV, when the user changes the selected index in the DropDownList. This should be done on the client side without postback, by using jQuery and Ajax.
Thanks
...