Home All Groups Group Topic Archive Search About
Author
26 Sep 2006 12:37 AM
Terry
Hello:
I ha e a web user control and my objective is to get the editor working when
I drop the control in a web page - but it is not - the url property is an
empty field and I woulkd like the ellipsys that would allow me to navigate
to and url.
Thanks

Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Text
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.Design
Imports System.Drawing.Design
Partial Class Internals_Controls_AutoDirectoryDisplayer
Inherits System.Web.UI.UserControl
Public http_url As String

<Browsable(True), Bindable(True), Description("this is a description"),
Editor(GetType(System.Web.UI.Design.UrlEditor), GetType(UITypeEditor))>
Public Property URL() As String

Get
Return http_url
End Get

Set(ByVal value As String)
http_url = value
End Set

End Property

End Class

Author
27 Sep 2006 5:05 PM
Gaurav Vaish (www.EduJiniOnline.com)
Use ViewState to store your URL rather than a class-field.

Show quoteHide quote
"Terry" <Support.notthisp***@mail.oci.state.ga.us> wrote in message
news:OObwzPQ4GHA.1256@TK2MSFTNGP04.phx.gbl...
> Hello:
> I ha e a web user control and my objective is to get the editor working
> when I drop the control in a web page - but it is not - the url property
> is an empty field and I woulkd like the ellipsys that would allow me to
> navigate to and url.
> Thanks
>
> Imports System
> Imports System.Collections.Generic
> Imports System.ComponentModel
> Imports System.Text
> Imports System.Web
> Imports System.Web.UI
> Imports System.Web.UI.WebControls
> Imports System.Web.UI.Design
> Imports System.Drawing.Design
> Partial Class Internals_Controls_AutoDirectoryDisplayer
> Inherits System.Web.UI.UserControl
> Public http_url As String
>
> <Browsable(True), Bindable(True), Description("this is a description"),
> Editor(GetType(System.Web.UI.Design.UrlEditor), GetType(UITypeEditor))>
> Public Property URL() As String
>
> Get
> Return http_url
> End Get
>
> Set(ByVal value As String)
> http_url = value
> End Set
>
> End Property
>
> End Class
>
>
Author
27 Sep 2006 10:25 PM
Terry
Thanks I understanding but this should have no effect on my issue.
You seem to know a lot about server controls - If you could explian what I
am doing wrong and edit my code - this could be usefull to everyone else.
This is a rather arcane topic...
Thanks Gaurav.


"Gaurav Vaish (www.EduJiniOnline.com)"
<gaurav.vaish.nospam@nospam.gmail.com> wrote in message
Show quoteHide quote
news:eDvJ0cl4GHA.1188@TK2MSFTNGP05.phx.gbl...
> Use ViewState to store your URL rather than a class-field.
>
> --
> Happy Hacking,
> Gaurav Vaish | http://www.mastergaurav.com
> http://www.edujinionline.com
> http://articles.edujinionline.com/webservices
> -------------------
>
>
> "Terry" <Support.notthisp***@mail.oci.state.ga.us> wrote in message
> news:OObwzPQ4GHA.1256@TK2MSFTNGP04.phx.gbl...
>> Hello:
>> I ha e a web user control and my objective is to get the editor working
>> when I drop the control in a web page - but it is not - the url property
>> is an empty field and I woulkd like the ellipsys that would allow me to
>> navigate to and url.
>> Thanks
>>
>> Imports System
>> Imports System.Collections.Generic
>> Imports System.ComponentModel
>> Imports System.Text
>> Imports System.Web
>> Imports System.Web.UI
>> Imports System.Web.UI.WebControls
>> Imports System.Web.UI.Design
>> Imports System.Drawing.Design
>> Partial Class Internals_Controls_AutoDirectoryDisplayer
>> Inherits System.Web.UI.UserControl
>> Public http_url As String
>>
>> <Browsable(True), Bindable(True), Description("this is a description"),
>> Editor(GetType(System.Web.UI.Design.UrlEditor), GetType(UITypeEditor))>
>> Public Property URL() As String
>>
>> Get
>> Return http_url
>> End Get
>>
>> Set(ByVal value As String)
>> http_url = value
>> End Set
>>
>> End Property
>>
>> End Class
>>
>>
>
>
Author
28 Sep 2006 1:21 AM
Gaurav Vaish (www.EduJiniOnline.com)
> You seem to know a lot about server controls - If you could explian what I
> am doing wrong and edit my code - this could be usefull to everyone else.

Get
    Dim obj as object = ViewState("URL")
    If Not IsNothing(object) then
        Return CType(obj, string)
    end if
    Return String.Empty
End Get

Set(Value as string)
    ViewState("URL") = Value
End Set


Please do check that the VB.Net syntax is correct... I'm not that good in
VB.Net :-)

> Thanks Gaurav.

    Always welcome.