I cannot figure out how to get my simple container control to properly display in the designer. Here is the basic markup of the custom control:
<div>
<div>Title</div>
<div>
<!-- ASP.Net child controls -->
</div>
</div>
Here is how it looks at runtime (title and then the child control is a GridView):
Here is the simple code for the basic container control:
namespace Shoe.Controls
//[Designer(typeof(ApplicationWindowDesigner))]
//[ParseChildren(false)]
//[PersistChildren(true)]
[ToolboxData("<{0}:ApplicationWindow runat="server"></{0}:ApplicationWindow>")]
public class ApplicationWindow : System.Web.UI.WebControls.Panel
{
#region Designer Properties
[Category("Appearance")]
[DefaultValue("Application")]
[Description("Title that will appear at the top of the Window.")]
[Browsable(true)]
public string Title
get{return (ViewState["ApplicationWindowTitle"] == null)?
string.Empty :
(string)ViewState["ApplicationWindowTitle"];}
set{ViewState["ApplicationWindowTitle"] = value;}
[code...]
As you see the code above, it is currently based off of the Panel control. However, I have also tried just using WebControl as the base class and then providing my own designer as follows:
namespace Shoe.Controls
public class ApplicationWindowDesigner : ContainerControlDesigner
//public class ApplicationWindowDesigner : ControlDesigner
public override void Initialize(IComponent component)
base.Initialize(component);
SetViewFlags(ViewFlags.DesignTimeHtmlRequiresLoadComplete, true);
[code...]
This is also what it looks like when I use WebControl as the base class for the control and use a designer based off of ContainerControlDesigner (child controld, but my title bar and divs are missing).What am I missing? I've found several examples of ContainerControlDesigner but none of them really add anything to the surrounding control like I am.
How do you delete more than one entity at the same time in the designer Entities list. it seems that the designer interface only allows the selection of 1 entity at a time....
I have a question regarding the GridView and the Control Designer of it.
I've made a composite control inherited of the GridView. I would like to make some new created BoundField controls available in the designer of the GridView control? So that I can select the custom BoundField control from the Available fields list.
I'm trying to find a TextBox in the code-behind page, it's inside a nested master page and also then inside another control container (it's inside ctrlCheckoutShippingAddress also) .
I created a aspx page that uses a master page. Inside I have a control, let's say txtName and I have a submit button, that when I press it it will submit the text in the txtName to another page.The problem is that the Request.Form key does not have the txtName, instead it something like clt00$Container0&txtName.Isn't there a way to easily find the key that I want to retrieve from there?
I am trying to find a textbox control within the tabpanel of a tab container of the source page. I have been searching the forums but have been unable to find the right example. Can someone help me or point me in the right direction. The source page is as follows:
I created a custom server control. The control works perfectly when added into a project. The issue I have though, is that in the designer - it shows the error --> "Error creating control - MyControl1 Object Reference not set to an instance of an object" The error is because I am using this code to load startup scripts
Dim pg As Page = HttpContext.Current.Handler
if i comment it out then the designer does not throw the object reference error so I know this is where the problem is. So here is my question: How can I get the designer to ignore the HttpContext.Current.Handler object for rendering puroposes?
I'm trying desperately to move from VSS to a real source control system. Options include TFS and SVN.My designers need to keep their ability to modify source files and instantly preview their changes in a browser without having to commit their changes. Using FPSE with VSS, this works flawlessly, since saving a file causes the copy in the working folder on the dev server to be updated, so they can just save and refresh their browser which is pointed at the dev server.The site in question consists of 350k+ lines of classic ASP code and some new ASP.NET MVC. They only need to be able to modify views within the MVC code, not C#. Though Expression includes a version of Cassini for local debugging, Cassini does not support classic ASP. Surely someone has solved this problem before. It can't be necessary to install IIS on each designer's machine (this is absolutely untenable). I need a way to have a common working folder on a dev webserver updated whenever someone saves a file locally, just like using FPSE.
i'm using ajax tab container control and i have 4 tabs on it. and each tabs contains a datalist. and whenever someone clicks on the datalist he has to redirected on abc.aspx page.so for that i 'm using itemcommand event but facing problem whenever i click on datalist the event is not fired.
This is my first silverlight Application. I am trying to use Rating Control from 3.0 Toolkit with VisualStudio 2008 Here are the problems: I am unable to see designer view after adding Rating Control and few other controls. I am not getting any errors or warnings on markup or while compiling. Trying to access Property window for any control is giving me this message " Property Editing not available". Is this the way silverlight was made available with Visual Studio or is there something I am missing here?
"The type or namespace name 'updatepanel' does not exist in the namespace 'System.Web.UI.WebControls.WebParts' (are you missing an assembly reference?)"
The actual namespace should be System.Web.UI.UpdatePanel. When I go directly into the designer.cs file and change it, it works. However, every time I go back into editing control.ascx and save, Visual Studio always changes it back to system.Web.UI.WebControls.Webparts.updatepanel. I'm not sure what is causing this. Is it how I should be referencing namespaces and classes in my project? I'm using .NET 3.5.
I'm working on building a an ASP.NET composite control that is a wrapper for a GridView object. I have been able to figure out how compose the control in order for the markup to appear correctly when added to an ASPX page. Now the issue I'm having is that when I drop an instance of the control on a form from the toolbox, I can't interact with the control using the functionality exposed by a GridView (e.g. columns editor, data source selector, etc.), and I don't see any design-time rendering of the child GridView control. What I would like to do is to basically forward the designer behavior of my composite control down to its child GridView control. I have experimented with implementing a custom designer class that inherits from GridViewDesigner that simply initializes itself using the GridView child of my composite control. However, this doesn't seem to work, as I encounter an "object reference not set to an instance of object" error at design time; I'm wondering if this is even the appropriate strategy to achieve what I'm looking for. how to enable GridView-like design time behavior in composite controls. I have scoured the Web looking for articles on how this is accomplished, but I've surprisingly found virtually no resources on the topic.
I have a usercontrol which has a combobox inside it.
This UserControl is the inside an asp panel - and when the panel is visible, the dropdownlist within the control binds to its datasource and behaves itself.
When the panel visibility is set to false, the dropdownlist within the usercontrol is empty.
dynamically resize a user control depending on the container it is currently in,or the other way around.and be able to resize a container based on the user controls size.Let me explain.Right now I have a page using the Ajax TabContainer and within one of the tabs I have my user control.My user control accepts a DataSet and simply lists the results in a GridView.
Right now when you go to the tab everything displays fine, except the results go all the way to the bottom of the page.What I would like to do,is to either resize the TabPanel to match the amount of data,or have a fixed height/width for the user control and make it scrollable.This user control can be on a number of different pages with different sized containers,so I am at a standstill.Has anyone done anything like this before or have an idea how it could be accomplished?
i created a user control that has a template container.
[code]....
This is control is placed in a repeater which lists some customers. The customer is than bound to the user control. When the name template is instantiated in the container, the customer object is not yet available, but I need to access its name because it needs to get parsed before.
[code]....
Question: How can I access properties set for the user control BEFORE the template container is instantiated?
Should bar on the HTML designer show the tag name? It sometimes does!
Here's an image of what I referring to.
I thought for sure it must be a bug but considering that I heard that MS was rewriting the editor (designer too?) I am starting to question whether I know how to use it!
Note the "TD" tooltip on the bottom right. Shouldn't this "TD" appear on the bar on the far right where the mouse would be?
When I format an accordion control using a skin file (as opposed to entering the formatting as attributes on each <asp:Accordion> tag), the control renders as expected when the website is run. However, in the VS2010 designer, the control won't display but instead shows the generic "Error Rendering Control" box which hasthe exception, "Collection was modified; enumeration operation may not execute."
I'm trying to develope a collapsible panel control with designer.
I have the following two classes:
[Code]....
and this one:
[Code]....
In fact, the designer class is a copy of a sample class in MSDN and I only tried to customize it to work for me. I'm not sure if all methods are necessary or not.
I have the following two questions:
1- When I use this contrl in design mode, I can add or delete controls to it, in the html view, tags are not updated. so when I close the page and open it again, all changes are lost.
2- I have added this control to the same asp.net project that is using this control. Isn't there any way to have this controil in tool box?
I'm using a third part control suite by Obout. I have a parent grid with two detail grids. One of the detail grids, grid2, has an edit template which generates a custom form. When I edit or add a record, I get the error The OboutDropDownList control 'ddlPosition' does not have a naming container. Ensure that the control is added to the page before calling DataBind.. Only the ddl(s) error. The textboxes, labels and calendars do not error if I comment out the dropdownlists. I'll attach the code.