Home All Groups Group Topic Archive Search About

link text box to datasource

Author
13 May 2005 10:30 PM
John M
Hello,

Is there any way to link a "textbox" element, that is on the aspx page, to a
field on database ?

Need sample code, please.

Thanks :)

Author
13 May 2005 11:54 PM
John Timney (ASP.NET MVP)
Try this

<asp:TextBox id="myTextBox" runat="server"
   Text='<%# DataViewname ( 0 ) ( "field_lname" ) %>'>
</asp:TextBox>

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

Show quoteHide quote
"John M" <nobody@nospam_please.com> wrote in message
news:%23JaUsKAWFHA.3620@TK2MSFTNGP09.phx.gbl...
> Hello,
>
> Is there any way to link a "textbox" element, that is on the aspx page, to
> a field on database ?
>
> Need sample code, please.
>
> Thanks :)
>
Are all your drivers up to date? click for free checkup

Author
15 May 2005 10:14 PM
John M
And how can I do that on design time on :
Microsoft Visual Studio .NET 2003 ?

Thanks :)

Show quoteHide quote
"John Timney (ASP.NET MVP)" <timneyj@despammed.com> wrote in message
news:OX2IhcBWFHA.2684@TK2MSFTNGP09.phx.gbl...
> Try this
>
> <asp:TextBox id="myTextBox" runat="server"
>   Text='<%# DataViewname ( 0 ) ( "field_lname" ) %>'>
> </asp:TextBox>
>
> --
> Regards
>
> John Timney
> ASP.NET MVP
> Microsoft Regional Director
>
> "John M" <nobody@nospam_please.com> wrote in message
> news:%23JaUsKAWFHA.3620@TK2MSFTNGP09.phx.gbl...
>> Hello,
>>
>> Is there any way to link a "textbox" element, that is on the aspx page,
>> to a field on database ?
>>
>> Need sample code, please.
>>
>> Thanks :)
>>
>
>
Author
15 May 2005 9:37 PM
John Timney (ASP.NET MVP)
add a text box and modify its properties in the code window

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

Show quoteHide quote
"John M" <nobody@nospam_please.com> wrote in message
news:eydimKZWFHA.3716@TK2MSFTNGP12.phx.gbl...
> And how can I do that on design time on :
> Microsoft Visual Studio .NET 2003 ?
>
> Thanks :)
>
> "John Timney (ASP.NET MVP)" <timneyj@despammed.com> wrote in message
> news:OX2IhcBWFHA.2684@TK2MSFTNGP09.phx.gbl...
>> Try this
>>
>> <asp:TextBox id="myTextBox" runat="server"
>>   Text='<%# DataViewname ( 0 ) ( "field_lname" ) %>'>
>> </asp:TextBox>
>>
>> --
>> Regards
>>
>> John Timney
>> ASP.NET MVP
>> Microsoft Regional Director
>>
>> "John M" <nobody@nospam_please.com> wrote in message
>> news:%23JaUsKAWFHA.3620@TK2MSFTNGP09.phx.gbl...
>>> Hello,
>>>
>>> Is there any way to link a "textbox" element, that is on the aspx page,
>>> to a field on database ?
>>>
>>> Need sample code, please.
>>>
>>> Thanks :)
>>>
>>
>>
>
>

Bookmark and Share