Ask a Question related to ASP.NET Building Controls, Design and Development.
-
DaBrain #1
Two question about ASP.NET Custom Controls [Newbie]
1) I am developing custom controls and was wondering how I can
implement the URL ~ deal.
~/page/page.aspx
How do I translate ~ to the web root? I must be overlooking something
very simple here?
2) How do have something like this
<aaa:control runat="server">STUFF HERE</aaa:control>
How do I programmatically get "STUFF HERE", Where does it show at?
Is it accessable?
DaBrain Guest
-
newbie question on Custom Controls in C#
I have just started working on an ASP.Net 1.0 project as my first forray into ASP.Net (or ASP for that matter), and have a general question about... -
Why the properties of web user controls which inherted from my custom base UI controls MISSED?
Why the properties of web user controls which inherted from my custom base UI controls MISSED? How should I to set enable? -
General Question about custom controls
In a windows application you use the Method() as an entry point for an application. In a web application using ASP.NET you use Page_Load() as an... -
Question about Custom Controls
Dear all I'm building a web application that some standard controls in many pages as "DropDownlist" this drop down list is filled from a table in a... -
Newbie Web Service Question regarding User Controls
Can I return a user control from a Web Service? I have a Web Page that has a Placeholder on it and I wish to populate this placeholder with a... -
Michael Hamrah #2
Re: Two question about ASP.NET Custom Controls [Newbie]
1) You can use the Page.ResolveClientUrl() property to properly parse
the ~ character. The ~ essentially deails with virtual directories
correctly.
2) This can be done via the parsechildren attribute.
Lets say you have a WebControl Demo with a property Text. To map the
Inner Html of the markup to the text property you would specify:
[ParseChildren(True, "Text")]
public class Demo
{
public string Text
{get; set; }
}
DaBrain wrote:> 1) I am developing custom controls and was wondering how I can
> implement the URL ~ deal.
>
> ~/page/page.aspx
>
>
> How do I translate ~ to the web root? I must be overlooking something
> very simple here?
>
>
> 2) How do have something like this
> <aaa:control runat="server">STUFF HERE</aaa:control>
>
>
> How do I programmatically get "STUFF HERE", Where does it show at?
>
> Is it accessable?Michael Hamrah Guest



Reply With Quote

