servercontrols

ASP.NET TimeLine Control

I am looking for a free control to display events in a to-scale-timeline. I couldn't get TimeLine.NET to work. Is there anything else I could try? EDIT Any flash or javascript solution would be fine as long as I can put data into it from a database. ...

Creating "pluggable" apps in asp.net mvc

I've been working with asp.net MVC and am still not very good at it. However, I have started wondering how would I go about creating applications that can be "plugged" or installed into an existing ASP.net MVC site with minimal complexity. For example, in ASP.net web forms I developed a sort of Blogging app. In order to install this ap...

Convert User Controls to Server Controls.

I'm wondering if anyone has any experience converting User controls to Web controls? Ideally, I'd like to offload some of the design work to others, who would give me nicely laid out User Controls. Then, I could go through the process of converting, compiling, testing and deploying. Until MS comes up with the magic "Convert to Serve...

How to test asp.net server controls

We have developed a number of ASP.Net server controls and we need to test them. I want to instantiate a control, set some properties, call CreateChildControls and test the control-hierarchy. I run into a number of problems: The controls rely on HttpContext CreateChildControls is private Even adding a single child control to the cont...

Visual Studio (2008) intellisense and EditorBrowsable attribute...

I am working on a C# project that involves ASP.NET custom server controls. I have several properties, methods etc that I hide from intellisense using the... [EditorBrowsable(EditorBrowsableState.Never)] ...attribute. I also have a web project set up to test these controls. When I reference the web controls as a component in the form o...

Inject HTML to server control

How do you inject HTML to a server control? I'm creating a calendar control and have some javascript/css that go with it. In addition, I have some html code that gets generated with the proper ClientIDs that work with the JS/CSS and I would like to inject this to where the "server" control is used. For example: <MyUC:UC1 ID="someUC" ...

ASP.net Page object null when invoking it from within templated control

Hi, I created a control that uses an ITemplate internally in order to allow the user to add its own stuff. <my:MyControl id="myControl" runat="server"> <Content> //some stuff in here </Content> </my:MyControl> The "Content" property is the template. (This is just simplified. This construct is within a larger control). ...

InstantiateIn method of server control doesn't get fired

Hi, I have the following situation: Server Control A: <my:ServerCtrlA ...> <Content> <my:ServerCtrlB .../> </Content> </my:ServerCtrlA> The <Content> property of ServerControlA is an ITemplate on which I call the InstantiateIn(...) method. ServerCtrlB is another control that may possibly be placed inside this Content pr...

The correct pattern for passing data to child controls in a server control

I'm working with a 3rd party system to implement some forms in a website. The 3rd party system provides me with XML definitions for these forms. e.g. <form> <segment> <label>The header</label> <fields> ... <field> <id>field_Dob</id> <type>Date</type> ...

Why do ASP.Net server control declarations require the runat="server" attribute?

Surely the fact that they're declared beginning with "<asp:" is enough to infer they're server controls? Or is it just included for completeness (so they look similar to the server control declaration of <input runat="server" for example). Or is there some special reason? It just always bugs me that the compiler tells me I've missed i...

ASP.NET server control wrapping GridView in a Panel linked to an AJAX Toolkit ResizableControlExtender - panel size does not initialise to the size of the grid

I am trying to create a resizable GridView wrapped up as a server control. I am using the ResizableControlExtender from the AJAX Control Kit, which as far as I know requires that the control that is to be resized must reside inside a panel the initial panel size must match the initial target control size. I can do this happ...

asp.net custom server control - how to tell if postback ocurred because of this control

I have a custom asp.net server control (actually a specialized version of a checkbox). I want to do some processing on a postback but only if the postback was a result of this control being clicked (with autopostback being set to true). What is the best way to determine if the postback is a result of this control or something else? Th...

Server controls in an asp.net repeater

Hi all.. Seems like I've ran into a wall here. I want some datasource to be bound to an asp.net repeater (well, doesn't have to be a repeater, but it seems like that's what I want). Now, here's the catch: I also need some server-controls inside that repeater for updating the data (TextBox'es and buttons). To my understanding, this aint...

How to access asp:Image from Javascript?

Hi all.. I got an asp:Image in my server-markup like this: <asp:Image ID="Img1" runat="server"/> Now, I want to find this img in my javascript, but seem to run into the problem of ASP.Net obfuscating my names. The client-markup will look something like this: <img id="ctl00_Content_Img1"/> I imagine this is because everything is in...

Is there any way to declaratively pass code-behind property values to server controls?

Can anyone explain why you can’t use inline code blocks within server control declarations in ASP.Net? The following is a simple example... .... <form id="form1" runat="server"> <asp:Label ID="Label1" runat="server" Text="<%= SomeProperty %>"></asp:Label> </form> .... The code block is rendered literally to the page... <span id=...

How to use Server Controls with PostBack with ASP.NET MVC?

Once I click the button, it throws a "Validation of viewstate MAC failed" exception. I know MVC does not support PostBack but is there any way to work around this? Or we need to use HtmlHelper in MVC? Below is my code in View: <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <form id="form1" runat="server...

ASP.NET server control: how to convert design-time string into object type (TypeConverter?)

So hopefully this is a silly question (that would make it easily answered). I'm trying to make a composite server control that encapsulates a TextBox, some validators and other stuff, depending on the type of field required. My control has a "DataType" value that lets me determine what to display. For example if DataType is "Date" I re...

Passing page's server controls as parameter in custom user control

Hi , I want to pass the page's server controls(especially gridviews,datalists,repeaters) as parameter to my custom server control. My purpose is to make a html to pdf export button as a custom server control.Programmer will add the my custom control to a page and select the control from the usercontrol properties which he/she wants to ma...

ASP.NET, Trigger codebehind eventhandler with anchor tag

Is it possible to call an eventhandler codebehind, using an anchor tag? I've tried different things, but it doesn't seem to work. I've tried writing my tag like this: <a class="Button" onclick="Button1_Click" runat="server"></a> with no success... Any ideas? ...

ASP.NET event wiring does not work correctly if the page has many controls in IE8 native mode.

Well, it looks like IE8 in native mode doesn't like ASP.NET event wiring. I have few heavy pages developed in ASP.NET 2.0. By heavy I mean having lots of server controls and callback controls. The final actions are Apply and Cancel but user sets data of controls through Callback calls. I have seen that when Apply button is clicked it ca...