Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Access Control in DataSource

Reply
Thread Tools

Access Control in DataSource

 
 
myzm
Guest
Posts: n/a
 
      04-28-2006
Hi,

I have a FormView looks like this
<asp:FormView>
<ItemTemplate>
<asp:Table>
<asp:TableRow>
<asp:TableCell>
<asp:TextBox ID="textBox1">
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</ItemTemplate>
</asp:FormView>

I want to reference the TextBox in DataSource parameters.

<asp:ObjectDataSource UpdateMethod="UpdateDistrict">
<UpdateParameters>
<asp:ControlParameter Name="ID" ControlID="TextBox1"
PropertyName="Text" />
</UpdateParameters>
</asp:ObjectDataSource>

How can do it? Thanks.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Y2xpY2tvbg==?=
Guest
Posts: n/a
 
      04-28-2006
If you put the DataSource control inside the the ItemTemplate the it will be
able to "see" the TextBox. Otherwise i think you will have to set the
parameter value from the DataSource programatically by using something like

TextBox MyTextBox = (TextBox)BoxFormView.Findcontrol("TextBox1");
Parameter=MyTextBox.Text;




"myzm" wrote:

> Hi,
>
> I have a FormView looks like this
> <asp:FormView>
> <ItemTemplate>
> <asp:Table>
> <asp:TableRow>
> <asp:TableCell>
> <asp:TextBox ID="textBox1">
> </asp:TableCell>
> </asp:TableRow>
> </asp:Table>
> </ItemTemplate>
> </asp:FormView>
>
> I want to reference the TextBox in DataSource parameters.
>
> <asp:ObjectDataSource UpdateMethod="UpdateDistrict">
> <UpdateParameters>
> <asp:ControlParameter Name="ID" ControlID="TextBox1"
> PropertyName="Text" />
> </UpdateParameters>
> </asp:ObjectDataSource>
>
> How can do it? Thanks.
>
>

 
Reply With Quote
 
 
 
 
myzm
Guest
Posts: n/a
 
      05-01-2006
Anyone has any idea about this problem? Thanks.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
class-based access control VS instance-based access control xz C++ 9 01-08-2008 11:20 AM
403 Forbidden: You were denied access because: Access denied by access control list Southern Kiwi NZ Computing 6 03-19-2006 05:19 AM
Cannot access current datasource row for ds bound to datagrid =?Utf-8?B?S2VpdGggSGFycmlz?= ASP .Net 0 11-08-2004 06:15 PM
Re: How to access DataSource rows onItemDatabound? ashelley@inlandkwpp.com ASP .Net 0 07-08-2004 04:27 PM
Templated column cannot access datasource column ASP .Net 2 11-10-2003 03:58 PM



Advertisments