Showing posts with label property. Show all posts
Showing posts with label property. Show all posts

Thursday, March 29, 2012

Pop Up?

I set the ValidationSummary control's ShowMessageBox property to display
error message in a dialog box.
But I found it only works with IE, Not Netscape.

Did someone have it work ever?

Thanks.Hi,

Validations got server and client side validation. When you browse your
pages in Netscape they use the server-side validation and not the
client-side validation as the client side Validation scripts only works
only with IE.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Monday, March 26, 2012

Populate asp:label with text from db and retain formatting?

set the text box Text Mode property to MultiLine.

Av.

"Tony" <anonymous@dotnet.itags.org.discussions.microsoft.com> wrote in message
news:7B9C3796-02D8-4180-AD93-8572746CD951@dotnet.itags.org.microsoft.com...
> Hello,
> Im can't seem to figure this out OR find any documentation on if it's
> possible; I need to populate the value of an asp:label with text retrieved
> from the database. However when the text is populated I need to retain
> carriage returns and indents that the text contains. That way if I want to
> see this:
> Some text with a manual
> carriage return.
> 1. this is one.
> 2. this is two.
> It doesn't look like this:
> Some text with a manual carriage return. 1. this is one. 2. this is two.
> I've tried enclosing the text in <pre></pre> tags before the text is
> assigned to the label and it works fine except for 2 things. The text is
> rendered in a non-styled font and in the instance that the user entered
> really long text and didn't manullay hit a carriage return- which causes
> the text continue to the right instead of automatically wrapping even
> though I define a width on my label, the cell the label is within, etc..
> Does anyone know how to get this to work? I must have looked around on the
> net for hours!TextMode is not a property for a label but a textbox. I have tried using a textbox control with this property set to multiline previously however without specifically setting the height of the textbox I end up with vertical scrollbars- which I cannot have because this is for a printable report.

populate checkboxlist from XmlDataSource (ASP.net 2.0)

can somebody please show me some code that will let me populate a
checkboxlist from the xmldatasource, and have the text property set to the
names in the xml file
thanks
you can also email me at i_am_the_freshmaka@dotnet.itags.org.hotmail.commike <mike@.discussions.microsoft.com> ha scritto:
> can somebody please show me some code that will let me populate a
> checkboxlist from the xmldatasource, and have the text property set
> to the names in the xml file
> thanks
With this XML file:
<?xml version="1.0" encoding="utf-8" ?>
<root>
<item value="1" text="Value 1" />
<item value="2" text="Value 2" />
<item value="3" text="Value 3" />
</root>
And this code:
<asp:CheckBoxList ID="CheckBoxList1" runat="server"
DataSourceID="XmlDataSource1"
DataTextField="text" DataValueField="value">
</asp:CheckBoxList><asp:XmlDataSource ID="XmlDataSource1" runat="server"
DataFile="~/Data/XMLFile.xml"></asp:XmlDataSource>
AZ [Microsoft - .NET MVP]
Mia Home page: http://ciclismo.sitiasp.it
Asp.Net community: http://www.aspitalia.com
Il mio blog: http://blogs.aspitalia.com/az
<Lookup>
<Lookup_Entry>
<Ts>
<T>
<M>context</M>
<V>type</V>
<Va>Citizen</Va>
</T>
</Ts>
<U>.html</U>
</Lookup_Entry>
</Lookup>
example of xml file is above
code:
<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/Lookup
table.xml"
XPath='/Lookup/Lookup_Entry/Ts/T/Va[../../T[M = "context" and V
= "type"]]'>
</asp:XmlDataSource>
<asp:CheckBoxList
ID="CheckBoxList1"
runat="server"
DataSourceID="XmlDataSource1">
</asp:CheckBoxList>
Now how do i get each <Va> that is returned with the xmldatasource as a item
in my checkboxlist
displayed now when run is with a checkbox to the left of each item:
System.Web.UI.WebControls.XmlDataSourceNodeDescriptor
System.Web.UI.WebControls.XmlDataSourceNodeDescriptor
System.Web.UI.WebControls.XmlDataSourceNodeDescriptor
System.Web.UI.WebControls.XmlDataSourceNodeDescriptor
System.Web.UI.WebControls.XmlDataSourceNodeDescriptor
System.Web.UI.WebControls.XmlDataSourceNodeDescriptor
System.Web.UI.WebControls.XmlDataSourceNodeDescriptor
mike
"Andrea Zani" wrote:

> mike <mike@.discussions.microsoft.com> ha scritto:
> With this XML file:
> <?xml version="1.0" encoding="utf-8" ?>
> <root>
> <item value="1" text="Value 1" />
> <item value="2" text="Value 2" />
> <item value="3" text="Value 3" />
> </root>
> And this code:
> <asp:CheckBoxList ID="CheckBoxList1" runat="server"
> DataSourceID="XmlDataSource1"
> DataTextField="text" DataValueField="value">
> </asp:CheckBoxList><asp:XmlDataSource ID="XmlDataSource1" runat="server"
> DataFile="~/Data/XMLFile.xml"></asp:XmlDataSource>
> --
> AZ [Microsoft - .NET MVP]
> Mia Home page: http://ciclismo.sitiasp.it
> Asp.Net community: http://www.aspitalia.com
> Il mio blog: http://blogs.aspitalia.com/az
>
>

populate checkboxlist from XmlDataSource (ASP.net 2.0)

can somebody please show me some code that will let me populate a
checkboxlist from the xmldatasource, and have the text property set to the
names in the xml file

thanks
you can also email me at i_am_the_freshmaka@dotnet.itags.org.hotmail.commike <mike@.discussions.microsoft.com> ha scritto:
> can somebody please show me some code that will let me populate a
> checkboxlist from the xmldatasource, and have the text property set
> to the names in the xml file
> thanks

With this XML file:
<?xml version="1.0" encoding="utf-8" ?>
<root>
<item value="1" text="Value 1" />
<item value="2" text="Value 2" />
<item value="3" text="Value 3" />
</root
And this code:
<asp:CheckBoxList ID="CheckBoxList1" runat="server"
DataSourceID="XmlDataSource1"
DataTextField="text" DataValueField="value">
</asp:CheckBoxList><asp:XmlDataSource ID="XmlDataSource1" runat="server"
DataFile="~/Data/XMLFile.xml"></asp:XmlDataSource
--
AZ [Microsoft - .NET MVP]
Mia Home page: http://ciclismo.sitiasp.it
Asp.Net community: http://www.aspitalia.com
Il mio blog: http://blogs.aspitalia.com/az
<Lookup>
<Lookup_Entry>
<Ts>
<T>
<M>context</M>
<V>type</V>
<Va>Citizen</Va>
</T>
</Ts>
<U>.html</U>
</Lookup_Entry>
</Lookup>
example of xml file is above

code:
<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/Lookup
table.xml"
XPath='/Lookup/Lookup_Entry/Ts/T/Va[../../T[M = "context" and V
= "type"]]'>
</asp:XmlDataSource>
<asp:CheckBoxList
ID="CheckBoxList1"
runat="server"
DataSourceID="XmlDataSource1">
</asp:CheckBoxList
Now how do i get each <Va> that is returned with the xmldatasource as a item
in my checkboxlist

displayed now when run is with a checkbox to the left of each item:
System.Web.UI.WebControls.XmlDataSourceNodeDescrip tor
System.Web.UI.WebControls.XmlDataSourceNodeDescrip tor
System.Web.UI.WebControls.XmlDataSourceNodeDescrip tor
System.Web.UI.WebControls.XmlDataSourceNodeDescrip tor
System.Web.UI.WebControls.XmlDataSourceNodeDescrip tor
System.Web.UI.WebControls.XmlDataSourceNodeDescrip tor
System.Web.UI.WebControls.XmlDataSourceNodeDescrip tor

mike

"Andrea Zani" wrote:

> mike <mike@.discussions.microsoft.com> ha scritto:
> > can somebody please show me some code that will let me populate a
> > checkboxlist from the xmldatasource, and have the text property set
> > to the names in the xml file
> > thanks
> With this XML file:
> <?xml version="1.0" encoding="utf-8" ?>
> <root>
> <item value="1" text="Value 1" />
> <item value="2" text="Value 2" />
> <item value="3" text="Value 3" />
> </root>
> And this code:
> <asp:CheckBoxList ID="CheckBoxList1" runat="server"
> DataSourceID="XmlDataSource1"
> DataTextField="text" DataValueField="value">
> </asp:CheckBoxList><asp:XmlDataSource ID="XmlDataSource1" runat="server"
> DataFile="~/Data/XMLFile.xml"></asp:XmlDataSource>
> --
> AZ [Microsoft - .NET MVP]
> Mia Home page: http://ciclismo.sitiasp.it
> Asp.Net community: http://www.aspitalia.com
> Il mio blog: http://blogs.aspitalia.com/az
>

Saturday, March 24, 2012

populate public property from a function

I have a public property in my server control and I want to populate it with
values generated by the control.
When I assign the value of the property to a function in the control, which
creates the values, I get a compilation error that says
the function doesn't have all the other property values to work with.
So, how do I populate the arraylist as a public property, so I can use it in
my web page ?
========== code in use ==========
I create the property wth the webpage by:
............
Dim arrTempList As New ArrayList()
oThis.myArrayList = arrTempList
...........
I have the the property defined in the control as:
...............
Public arrChartList As Arraylist
Public Property myArrayList As ArrayList
Get
Return arrChartList
End Get
Set
arrChartList = myfunction() '<--builds values for arraylist
End Set
End Property
.................Where is 'myfunction' declared? This looks like a scoping issue.
I am also why in the Set for a property, you would completely
ignore the argument and just call a function. Why bother having a Set on the
property to begin with? People are going to be setting the property to
something - but that something will be complete ignored? Very confusing.
"Jon Paal" <Jon[ nospam ]Paal @. everywhere dot com> wrote in message
news:evc1ARHSGHA.5908@.TK2MSFTNGP10.phx.gbl...
>I have a public property in my server control and I want to populate it
>with values generated by the control.
> When I assign the value of the property to a function in the control,
> which creates the values, I get a compilation error that says the function
> doesn't have all the other property values to work with.
> So, how do I populate the arraylist as a public property, so I can use it
> in my web page ?
>
> ========== code in use ==========
> I create the property wth the webpage by:
> ............
> Dim arrTempList As New ArrayList()
> oThis.myArrayList = arrTempList
> ...........
>
> I have the the property defined in the control as:
> ...............
> Public arrChartList As Arraylist
> Public Property myArrayList As ArrayList
> Get
> Return arrChartList
> End Get
> Set
> arrChartList = myfunction() '<--builds values for arraylist
> End Set
> End Property
> .................
>
>
"myfunction" is in the control.
Yes, I am totally on this and really need help.
what should I be doing ?
"Marina Levit [MVP]" <someone@.nospam.com> wrote in message news:%236og2UHSGHA.4440@.TK2MSFTNGP11.
phx.gbl...
> Where is 'myfunction' declared? This looks like a scoping issue.
> I am also why in the Set for a property, you would completely ign
ore the argument and just call a function. Why bother
> having a Set on the property to begin with? People are going to be setting
the property to something - but that something will be
> complete ignored? Very confusing.
> "Jon Paal" <Jon[ nospam ]Paal @. everywhere dot com> wrote in message news:
evc1ARHSGHA.5908@.TK2MSFTNGP10.phx.gbl...
>
That depends on what you are trying to do in the first place. You either
want the user to assign a value to the property or you don't and want to
assign the variable a value returned by a function instead.
"Jon Paal" <Jon[ nospam ]Paal @. everywhere dot com> wrote in message
news:%23jldn$HSGHA.224@.TK2MSFTNGP10.phx.gbl...
> "myfunction" is in the control.
> Yes, I am totally on this and really need help.
> what should I be doing ?
>
>
> "Marina Levit [MVP]" <someone@.nospam.com> wrote in message
> news:%236og2UHSGHA.4440@.TK2MSFTNGP11.phx.gbl...
>
I want the property to have the value created by the function.
"Marina Levit [MVP]" <someone@.nospam.com> wrote in message news:uW8uI$PSGHA.1780@.TK2MSFTNGP12.ph
x.gbl...
> That depends on what you are trying to do in the first place. You either w
ant the user to assign a value to the property or you
> don't and want to assign the variable a value returned by a function inste
ad.
> "Jon Paal" <Jon[ nospam ]Paal @. everywhere dot com> wrote in message news:
%23jldn$HSGHA.224@.TK2MSFTNGP10.phx.gbl...
>

populate public property from a function

I have a public property in my server control and I want to populate it with values generated by the control.

When I assign the value of the property to a function in the control, which creates the values, I get a compilation error that says
the function doesn't have all the other property values to work with.

So, how do I populate the arraylist as a public property, so I can use it in my web page ?

========== code in use ==========
I create the property wth the webpage by:

............
Dim arrTempList As New ArrayList()
oThis.myArrayList = arrTempList
............

I have the the property defined in the control as:

................
Public arrChartList As Arraylist
Public Property myArrayList As ArrayList
Get
Return arrChartList
End Get
Set
arrChartList = myfunction() '<--builds values for arraylist
End Set
End Property
..................Where is 'myfunction' declared? This looks like a scoping issue.

I am also confused why in the Set for a property, you would completely
ignore the argument and just call a function. Why bother having a Set on the
property to begin with? People are going to be setting the property to
something - but that something will be complete ignored? Very confusing.

"Jon Paal" <Jon[ nospam ]Paal @. everywhere dot com> wrote in message
news:evc1ARHSGHA.5908@.TK2MSFTNGP10.phx.gbl...
>I have a public property in my server control and I want to populate it
>with values generated by the control.
> When I assign the value of the property to a function in the control,
> which creates the values, I get a compilation error that says the function
> doesn't have all the other property values to work with.
> So, how do I populate the arraylist as a public property, so I can use it
> in my web page ?
>
> ========== code in use ==========
> I create the property wth the webpage by:
> ............
> Dim arrTempList As New ArrayList()
> oThis.myArrayList = arrTempList
> ...........
>
> I have the the property defined in the control as:
> ...............
> Public arrChartList As Arraylist
> Public Property myArrayList As ArrayList
> Get
> Return arrChartList
> End Get
> Set
> arrChartList = myfunction() '<--builds values for arraylist
> End Set
> End Property
> .................
"myfunction" is in the control.

Yes, I am totally confused on this and really need help.

what should I be doing ?

"Marina Levit [MVP]" <someone@.nospam.com> wrote in message news:%236og2UHSGHA.4440@.TK2MSFTNGP11.phx.gbl...
> Where is 'myfunction' declared? This looks like a scoping issue.
> I am also confused why in the Set for a property, you would completely ignore the argument and just call a function. Why bother
> having a Set on the property to begin with? People are going to be setting the property to something - but that something will be
> complete ignored? Very confusing.
> "Jon Paal" <Jon[ nospam ]Paal @. everywhere dot com> wrote in message news:evc1ARHSGHA.5908@.TK2MSFTNGP10.phx.gbl...
>>I have a public property in my server control and I want to populate it with values generated by the control.
>>
>> When I assign the value of the property to a function in the control, which creates the values, I get a compilation error that
>> says the function doesn't have all the other property values to work with.
>>
>> So, how do I populate the arraylist as a public property, so I can use it in my web page ?
>>
>>
>> ========== code in use ==========
>> I create the property wth the webpage by:
>>
>> ............
>> Dim arrTempList As New ArrayList()
>> oThis.myArrayList = arrTempList
>> ...........
>>
>>
>> I have the the property defined in the control as:
>>
>> ...............
>> Public arrChartList As Arraylist
>> Public Property myArrayList As ArrayList
>> Get
>> Return arrChartList
>> End Get
>> Set
>> arrChartList = myfunction() '<--builds values for arraylist
>> End Set
>> End Property
>> .................
>>
>>
>>
That depends on what you are trying to do in the first place. You either
want the user to assign a value to the property or you don't and want to
assign the variable a value returned by a function instead.

"Jon Paal" <Jon[ nospam ]Paal @. everywhere dot com> wrote in message
news:%23jldn$HSGHA.224@.TK2MSFTNGP10.phx.gbl...
> "myfunction" is in the control.
> Yes, I am totally confused on this and really need help.
> what should I be doing ?
>
>
> "Marina Levit [MVP]" <someone@.nospam.com> wrote in message
> news:%236og2UHSGHA.4440@.TK2MSFTNGP11.phx.gbl...
>> Where is 'myfunction' declared? This looks like a scoping issue.
>>
>> I am also confused why in the Set for a property, you would completely
>> ignore the argument and just call a function. Why bother having a Set on
>> the property to begin with? People are going to be setting the property
>> to something - but that something will be complete ignored? Very
>> confusing.
>>
>> "Jon Paal" <Jon[ nospam ]Paal @. everywhere dot com> wrote in message
>> news:evc1ARHSGHA.5908@.TK2MSFTNGP10.phx.gbl...
>>>I have a public property in my server control and I want to populate it
>>>with values generated by the control.
>>>
>>> When I assign the value of the property to a function in the control,
>>> which creates the values, I get a compilation error that says the
>>> function doesn't have all the other property values to work with.
>>>
>>> So, how do I populate the arraylist as a public property, so I can use
>>> it in my web page ?
>>>
>>>
>>> ========== code in use ==========
>>> I create the property wth the webpage by:
>>>
>>> ............
>>> Dim arrTempList As New ArrayList()
>>> oThis.myArrayList = arrTempList
>>> ...........
>>>
>>>
>>> I have the the property defined in the control as:
>>>
>>> ...............
>>> Public arrChartList As Arraylist
>>> Public Property myArrayList As ArrayList
>>> Get
>>> Return arrChartList
>>> End Get
>>> Set
>>> arrChartList = myfunction() '<--builds values for
>>> arraylist
>>> End Set
>>> End Property
>>> .................
>>>
>>>
>>>
>>
>>
I want the property to have the value created by the function.

"Marina Levit [MVP]" <someone@.nospam.com> wrote in message news:uW8uI$PSGHA.1780@.TK2MSFTNGP12.phx.gbl...
> That depends on what you are trying to do in the first place. You either want the user to assign a value to the property or you
> don't and want to assign the variable a value returned by a function instead.
> "Jon Paal" <Jon[ nospam ]Paal @. everywhere dot com> wrote in message news:%23jldn$HSGHA.224@.TK2MSFTNGP10.phx.gbl...
>> "myfunction" is in the control.
>>
>> Yes, I am totally confused on this and really need help.
>>
>> what should I be doing ?
>>
>>
>>
>>
>>
>> "Marina Levit [MVP]" <someone@.nospam.com> wrote in message news:%236og2UHSGHA.4440@.TK2MSFTNGP11.phx.gbl...
>>> Where is 'myfunction' declared? This looks like a scoping issue.
>>>
>>> I am also confused why in the Set for a property, you would completely ignore the argument and just call a function. Why bother
>>> having a Set on the property to begin with? People are going to be setting the property to something - but that something will
>>> be complete ignored? Very confusing.
>>>
>>> "Jon Paal" <Jon[ nospam ]Paal @. everywhere dot com> wrote in message news:evc1ARHSGHA.5908@.TK2MSFTNGP10.phx.gbl...
>>>>I have a public property in my server control and I want to populate it with values generated by the control.
>>>>
>>>> When I assign the value of the property to a function in the control, which creates the values, I get a compilation error that
>>>> says the function doesn't have all the other property values to work with.
>>>>
>>>> So, how do I populate the arraylist as a public property, so I can use it in my web page ?
>>>>
>>>>
>>>> ========== code in use ==========
>>>> I create the property wth the webpage by:
>>>>
>>>> ............
>>>> Dim arrTempList As New ArrayList()
>>>> oThis.myArrayList = arrTempList
>>>> ...........
>>>>
>>>>
>>>> I have the the property defined in the control as:
>>>>
>>>> ...............
>>>> Public arrChartList As Arraylist
>>>> Public Property myArrayList As ArrayList
>>>> Get
>>>> Return arrChartList
>>>> End Get
>>>> Set
>>>> arrChartList = myfunction() '<--builds values for arraylist
>>>> End Set
>>>> End Property
>>>> .................
>>>>
>>>>
>>>>
>>>
>>>
>>
>>

Friday, March 16, 2012

Populating a text field and then getting its value

If I change the textbox property Readonly to false then it works perfectly
fine. I am using the latest Beta 2 release of .net framework.
Imran.

"Grant Merwitz" <grant@dotnet.itags.org.workshare.com> wrote in message
news:O0YmSUcmFHA.576@dotnet.itags.org.TK2MSFTNGP15.phx.gbl...
> Thats a strange one.
> Working fine for me:
> ASPX:
> <asp:TextBox id="TextBox1" runat="server" ReadOnly="True"
> OnClick="Button1_Click"></asp:TextBox>
> <asp:Button id="Button1" runat="server" Text="Button"></asp:Button>
> CS
> void Page_Load(object sender, System.EventArgs e)
> {
> if(!Page.IsPostBack)
> TextBox1.Text = "Hello";
> }
> void Button1_Click(object sender, System.EventArgs e)
> {
> Response.Write("Value: " + TextBox1.Text);
> }
> OUTPUT
> Value: Hello
>
> Try making a simple page like that and testing it
>
> "Imran Aziz" <imran@dotnet.itags.org.tb2.net> wrote in message
> news:e43rNIcmFHA.2860@dotnet.itags.org.TK2MSFTNGP15.phx.gbl...
>> Hello All,
>> I am populating a text field dynamic in my code, and its a read-only
>> textbox control. It populates it perfectly fine. but when I get its value
>> back in code I get an empty string any clues as to how to get this sorted
>> please ?
>>
>> Here is how I set the value of the control.
>> txtTitle.Text = feed.Channels[0].Title;
>>
>> and get it later
>>
>> String strString = txtTitle.Text;
>>
>> Any clues please ?
>>
>> Imran.
>>okay, i'm on v1.1

I have beta 2 on a machine here.
If i have time to test it before i go, i'll try run the example there

"Imran Aziz" <imran@.tb2.net> wrote in message
news:%23rwRZUdmFHA.2860@.TK2MSFTNGP15.phx.gbl...
> If I change the textbox property Readonly to false then it works
> perfectly fine. I am using the latest Beta 2 release of .net framework.
> Imran.
> "Grant Merwitz" <grant@.workshare.com> wrote in message
> news:O0YmSUcmFHA.576@.TK2MSFTNGP15.phx.gbl...
>> Thats a strange one.
>> Working fine for me:
>>
>> ASPX:
>>
>> <asp:TextBox id="TextBox1" runat="server" ReadOnly="True"
>> OnClick="Button1_Click"></asp:TextBox>
>> <asp:Button id="Button1" runat="server"
>> Text="Button"></asp:Button>
>>
>> CS
>>
>> void Page_Load(object sender, System.EventArgs e)
>> {
>> if(!Page.IsPostBack)
>> TextBox1.Text = "Hello";
>> }
>>
>> void Button1_Click(object sender, System.EventArgs e)
>> {
>> Response.Write("Value: " + TextBox1.Text);
>> }
>>
>> OUTPUT
>>
>> Value: Hello
>>
>>
>> Try making a simple page like that and testing it
>>
>>
>> "Imran Aziz" <imran@.tb2.net> wrote in message
>> news:e43rNIcmFHA.2860@.TK2MSFTNGP15.phx.gbl...
>>> Hello All,
>>> I am populating a text field dynamic in my code, and its a read-only
>>> textbox control. It populates it perfectly fine. but when I get its
>>> value back in code I get an empty string any clues as to how to get this
>>> sorted please ?
>>>
>>> Here is how I set the value of the control.
>>> txtTitle.Text = feed.Channels[0].Title;
>>>
>>> and get it later
>>>
>>> String strString = txtTitle.Text;
>>>
>>> Any clues please ?
>>>
>>> Imran.
>>>
>>
>>
Thanks a lot.
Imran.
"Grant Merwitz" <grant@.workshare.com> wrote in message
news:u9$zKbdmFHA.3936@.TK2MSFTNGP10.phx.gbl...
> okay, i'm on v1.1
> I have beta 2 on a machine here.
> If i have time to test it before i go, i'll try run the example there
> "Imran Aziz" <imran@.tb2.net> wrote in message
> news:%23rwRZUdmFHA.2860@.TK2MSFTNGP15.phx.gbl...
>> If I change the textbox property Readonly to false then it works
>> perfectly fine. I am using the latest Beta 2 release of .net framework.
>> Imran.
>>
>> "Grant Merwitz" <grant@.workshare.com> wrote in message
>> news:O0YmSUcmFHA.576@.TK2MSFTNGP15.phx.gbl...
>>> Thats a strange one.
>>> Working fine for me:
>>>
>>> ASPX:
>>>
>>> <asp:TextBox id="TextBox1" runat="server" ReadOnly="True"
>>> OnClick="Button1_Click"></asp:TextBox>
>>> <asp:Button id="Button1" runat="server"
>>> Text="Button"></asp:Button>
>>>
>>> CS
>>>
>>> void Page_Load(object sender, System.EventArgs e)
>>> {
>>> if(!Page.IsPostBack)
>>> TextBox1.Text = "Hello";
>>> }
>>>
>>> void Button1_Click(object sender, System.EventArgs e)
>>> {
>>> Response.Write("Value: " + TextBox1.Text);
>>> }
>>>
>>> OUTPUT
>>>
>>> Value: Hello
>>>
>>>
>>> Try making a simple page like that and testing it
>>>
>>>
>>> "Imran Aziz" <imran@.tb2.net> wrote in message
>>> news:e43rNIcmFHA.2860@.TK2MSFTNGP15.phx.gbl...
>>>> Hello All,
>>>> I am populating a text field dynamic in my code, and its a read-only
>>>> textbox control. It populates it perfectly fine. but when I get its
>>>> value back in code I get an empty string any clues as to how to get
>>>> this sorted please ?
>>>>
>>>> Here is how I set the value of the control.
>>>> txtTitle.Text = feed.Channels[0].Title;
>>>>
>>>> and get it later
>>>>
>>>> String strString = txtTitle.Text;
>>>>
>>>> Any clues please ?
>>>>
>>>> Imran.
>>>>
>>>
>>>
>>
>>
Sorry it took me so long to try this.

But it's working fine for me on a Machine running Beta 2

"Imran Aziz" <imran@.tb2.net> wrote in message
news:ujgDxxdmFHA.2472@.TK2MSFTNGP15.phx.gbl...
> Thanks a lot.
> Imran.
> "Grant Merwitz" <grant@.workshare.com> wrote in message
> news:u9$zKbdmFHA.3936@.TK2MSFTNGP10.phx.gbl...
>> okay, i'm on v1.1
>>
>> I have beta 2 on a machine here.
>> If i have time to test it before i go, i'll try run the example there
>>
>> "Imran Aziz" <imran@.tb2.net> wrote in message
>> news:%23rwRZUdmFHA.2860@.TK2MSFTNGP15.phx.gbl...
>>> If I change the textbox property Readonly to false then it works
>>> perfectly fine. I am using the latest Beta 2 release of .net framework.
>>> Imran.
>>>
>>> "Grant Merwitz" <grant@.workshare.com> wrote in message
>>> news:O0YmSUcmFHA.576@.TK2MSFTNGP15.phx.gbl...
>>>> Thats a strange one.
>>>> Working fine for me:
>>>>
>>>> ASPX:
>>>>
>>>> <asp:TextBox id="TextBox1" runat="server" ReadOnly="True"
>>>> OnClick="Button1_Click"></asp:TextBox>
>>>> <asp:Button id="Button1" runat="server"
>>>> Text="Button"></asp:Button>
>>>>
>>>> CS
>>>>
>>>> void Page_Load(object sender, System.EventArgs e)
>>>> {
>>>> if(!Page.IsPostBack)
>>>> TextBox1.Text = "Hello";
>>>> }
>>>>
>>>> void Button1_Click(object sender, System.EventArgs e)
>>>> {
>>>> Response.Write("Value: " + TextBox1.Text);
>>>> }
>>>>
>>>> OUTPUT
>>>>
>>>> Value: Hello
>>>>
>>>>
>>>> Try making a simple page like that and testing it
>>>>
>>>>
>>>> "Imran Aziz" <imran@.tb2.net> wrote in message
>>>> news:e43rNIcmFHA.2860@.TK2MSFTNGP15.phx.gbl...
>>>>> Hello All,
>>>>> I am populating a text field dynamic in my code, and its a
>>>>> read-only textbox control. It populates it perfectly fine. but when I
>>>>> get its value back in code I get an empty string any clues as to how
>>>>> to get this sorted please ?
>>>>>
>>>>> Here is how I set the value of the control.
>>>>> txtTitle.Text = feed.Channels[0].Title;
>>>>>
>>>>> and get it later
>>>>>
>>>>> String strString = txtTitle.Text;
>>>>>
>>>>> Any clues please ?
>>>>>
>>>>> Imran.
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
Hum strange I am doing something wrong then, I guess I will try and use
labels instead of text boxes.
Thanks a lot for coming back to me on that.

Imran
"Grant Merwitz" <grant@.workshare.com> wrote in message
news:eUjjZmNnFHA.3572@.TK2MSFTNGP09.phx.gbl...
> Sorry it took me so long to try this.
> But it's working fine for me on a Machine running Beta 2
>
> "Imran Aziz" <imran@.tb2.net> wrote in message
> news:ujgDxxdmFHA.2472@.TK2MSFTNGP15.phx.gbl...
>> Thanks a lot.
>> Imran.
>> "Grant Merwitz" <grant@.workshare.com> wrote in message
>> news:u9$zKbdmFHA.3936@.TK2MSFTNGP10.phx.gbl...
>>> okay, i'm on v1.1
>>>
>>> I have beta 2 on a machine here.
>>> If i have time to test it before i go, i'll try run the example there
>>>
>>> "Imran Aziz" <imran@.tb2.net> wrote in message
>>> news:%23rwRZUdmFHA.2860@.TK2MSFTNGP15.phx.gbl...
>>>> If I change the textbox property Readonly to false then it works
>>>> perfectly fine. I am using the latest Beta 2 release of .net framework.
>>>> Imran.
>>>>
>>>> "Grant Merwitz" <grant@.workshare.com> wrote in message
>>>> news:O0YmSUcmFHA.576@.TK2MSFTNGP15.phx.gbl...
>>>>> Thats a strange one.
>>>>> Working fine for me:
>>>>>
>>>>> ASPX:
>>>>>
>>>>> <asp:TextBox id="TextBox1" runat="server" ReadOnly="True"
>>>>> OnClick="Button1_Click"></asp:TextBox>
>>>>> <asp:Button id="Button1" runat="server"
>>>>> Text="Button"></asp:Button>
>>>>>
>>>>> CS
>>>>>
>>>>> void Page_Load(object sender, System.EventArgs e)
>>>>> {
>>>>> if(!Page.IsPostBack)
>>>>> TextBox1.Text = "Hello";
>>>>> }
>>>>>
>>>>> void Button1_Click(object sender, System.EventArgs e)
>>>>> {
>>>>> Response.Write("Value: " + TextBox1.Text);
>>>>> }
>>>>>
>>>>> OUTPUT
>>>>>
>>>>> Value: Hello
>>>>>
>>>>>
>>>>> Try making a simple page like that and testing it
>>>>>
>>>>>
>>>>> "Imran Aziz" <imran@.tb2.net> wrote in message
>>>>> news:e43rNIcmFHA.2860@.TK2MSFTNGP15.phx.gbl...
>>>>>> Hello All,
>>>>>> I am populating a text field dynamic in my code, and its a
>>>>>> read-only textbox control. It populates it perfectly fine. but when I
>>>>>> get its value back in code I get an empty string any clues as to how
>>>>>> to get this sorted please ?
>>>>>>
>>>>>> Here is how I set the value of the control.
>>>>>> txtTitle.Text = feed.Channels[0].Title;
>>>>>>
>>>>>> and get it later
>>>>>>
>>>>>> String strString = txtTitle.Text;
>>>>>>
>>>>>> Any clues please ?
>>>>>>
>>>>>> Imran.
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>

Populating ComboBox From Dataset

Hi Guys,

I need to populate a combobox from a dataset returned from a webservice. I set the datasource property of the control to the web method but got an empty list at run time! What am I doing wrong? Any help on how to achieve this? Looping through a datareader solved the problem but I want to consume a dataset from a web service. I thought this would be a straight stuff but I'm having problems with it.After setting the datasource property you have to bind the data to your controll.

It seems you are missing that bit.
I can handle that with DropDownList control in ASP.Net but not with ComboBox in Windows Application! Could you kindly show how syntactically?
Are you getting an error?
What does it say?

Post your code so that we can see more clearly what has gone wrong
I am not getting any error message! I only get this wierd entry in the ComboBox. "System.Data.DataViewManagerListItemTypeDescriptor"

This is the code that I used.

Private Sub Users_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim wsDemo As New ng_app001_pc_stock.PCInventory
ComboBox1.datasource = wsDemo.getAllOSTypes
End Sub

The webmethod getAllOSTypes works well, at least I tested it with DataGrid control. What could be wrong?