CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

MS SQL 2008 on ASP.NET Hosting



Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 10/29/2003 2:37:44 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 39 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
NarcisoLema
Asp.Net User
Updating attributes in the design mode tag of a WebControl.10/29/2003 2:37:44 PM

0/0

Hi!
I have a problem with a control at the time when I update one of her properties in the Properties Window.
I have made a control that one of her properties is another webcontrol, so when you see this in the Properties Window, you see a list of controls of the same type expected in my control.
So when I select one of the controls of the page in the list, i build the project the property is set to none again.

This is an example of the code I use to make my control:

[Designer("MyWebControls.Designers.MyDataGridValidatorDesigner")]
public class MyDataGridValidator : WebControl{
private MyDataGrid _MyDataGridToControl;

[NotifyParentProperty(true)]
public MyDataGrid MyDataGridToControl{
get{ return this._MyDataGridToControl; }
set{ this._MyDataGridToControl = value; }
}

...
}

What im looking for is the same behavior of a validator control, that you set the control that you want to control. But when you update this property in the Properties Window, the validator control tag change and put "ControlToValidate=MyTextBox" for example.
The validator only put the name of the control in tag, some other tags like the DataGrid puts <%# mydataset %> for example in the DataSource.

So how I can get that behavior in my control, what attribute o other kind of solution will be.

Thanks for all,

Narciso.
Andy Smith
Asp.Net User
Re: Updating attributes in the design mode tag of a WebControl.10/29/2003 4:50:39 PM

0/0

The validators use a String property which is the ID of the control, not the control itself. They then use a TypeConverter attribute on the String property to show a dropdownlist of control ids that come from the controls on the page that are validatable. If you want to a similar DropDownList for your string property, you can use the typeconverter code I posted in my blog.
NarcisoLema
Asp.Net User
Re: Updating attributes in the design mode tag of a WebControl.10/30/2003 1:39:48 PM

0/0

Thanks Andy for your help in this case, but if like the behavior of the DataGrid with their DataSource property when you select a dataset from the list in the Properties Windows, they put a scriplet in the design mode tag like this <%# dataset1 %>, how can i do this with a my control?

Andy Smith
Asp.Net User
Re: Updating attributes in the design mode tag of a WebControl.10/30/2003 6:38:48 PM

0/0

What I'm saying is that you neither should nor want to do that. You should use the related control's ID, not a reference to the control itself. Of course, you could have a private property that gives you a reference to the datagrid itself, by using FindControl to get it.

But you should use the ID for a variety of reasons. One very good one is that you don't have to use DataBinding ( that's what the "<%#" syntax does ) to set the property. DataBinding is a fairly expensive operation. Another is that an ID can be stored in viewstate, and hence you can easily persist changes to the property. A reference-based property cannot be stored in viewstate.
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Visual C# 2005: How to Program Authors: Harvey M. Deitel, Paul J. Deitel, Pages: 1591, Published: 2006
C# for Programmers: Updated for C# 2.0 Authors: Paul J. Deitel, Pages: 1317, Published: 2005
Webmaster's Guide to the Wireless Internet Authors: Ryan Fife, Wei Meng Lee, Pages: 0, Published: 2001
Professional Web Parts and Custom Controls with ASP.NET 2.0 Authors: Peter Vogel, Pages: 449, Published: 2005
Beginning ASP.NET 1.0 with Visual Basic.NET: With Visual Basic .NET Authors: Chris Goode, John Kauffman, Rob Birdwell, Christopher L. Miller, Neil Raybould, S. Srinivasa Sivakumar, Ollie Cornes, Dave Sussman, Matt Butler, Gary Johnson, Chris Ullman, Ajoy Krishnamoorthy, Juan T. Llibre, Pages: 816, Published: 2002
Beginning ASP.NET in VB.NET: From Novice to Professional Authors: Matthew MacDonald, Pages: 983, Published: 2004

Web:
CodeProject: ComboBox WebControl. Free source code and programming ... IE ComboBox WebControl; Author: khoi pham; Section: Custom Controls; Chapter: Web ... you can drag and drop the control to the web page in Design mode. ...
Error: Content is not allowed between the opening and closing tags ... I have a ascx webcontrol that I register with: <%@ Register Src=". .... My next problem is that I want the Design Mode of VS. ...
Icon Members Attributes (inherited from WebControl), Gets the collection of arbitrary attributes (for ... DesignMode (inherited from WebControl), Test for design mode ...
Error: Content is not allowed between the opening and closing tags ... microsoft.public.dotnet.framework.aspnet.webcontrols ..... My next problem is that I want the Design Mode of VS.Net 2005 to show a more ...
SqlDataSourceDesigner Members (System.Web.UI.Design.WebControls) PreFilterAttributes, Allows a designer to add to the set of attributes that it .... is in either template viewing or editing mode in the design host. ...
CodeProject: FlashMovie WebControl. Free source code and ... This will render out a script tag with the SRC attribute set to your URI. ..... Well in design mode gaves me a Error Rendering Control(there is a way to fix ...
asp.net webcontrols -- developmentnow discussions How can I create a control that renders a
but contains for example a gridview that I can edit its properties on design mode? ...
microsoft.public.dotnet.framework.aspnet.webcontrols: By Thread Setting Attribute so some controls will not show in ToolBar? Earl Teigrob (09/23 /04) ..... Viweing Web Controls in Design Mode Carlos Hernandez (09/10/04) ...
RSS Feeds Submission Directory › RSS - aspnet webcontrols AJAX Problem with updating UpdatePanel from control in Accordion pane - Thu, .... Custom Webcontrol Design time help.. - Wed, 10 Sep 2008 16:21:23 GMT ...
Microsoft SharePoint Designer Team Blog : Best Practice to create ... Oct 3, 2008 ... DesignMode. Use them to protect dangerous Page.Request call. .... can be persisted either as an attribute on the control tag markup, ...




Search This Site:










control recreation based on property

2 issues in builing custom controls.

do you know any free hosting provider?

email control

setting a default value on a control property

how to overcome the need to pay for sql2005 in asp.net 2.0 hosting

please tell about your web host transfer experiences.

using controls with frontpage

usercontrol and child properties

events not triggered

confuxing controls

building and retrieving dynamic control values

any suggestions for asp.net 2.0 dedicated server hosting ?

create asp:button "on the fly"

help creating static image in my server control

editorbrowsableattribute confusion (and bugs?)

what am i doing wrong? tagprefix...

any one hosting with ultima now.....?

problem with user control event

specifying a webcontrol's toolbox icon

mssql 2005 can be used for commercial web hosting

how to get rid of clients?

multiple controls

why can't i add controls dynamically to my customer server control?

sorting a hybriddictionary?

possible to globally specify a register tagprefix in the web.config file?

htmlinputfile in a custom web control

2nd attempt - license an asp.net server control (dll)

email

shared hosting, godaddy, sql express, aspnetdb.mdf

  Privacy | Contact Us
All Times Are GMT