datagrid error

D

Dave Petersen

I have a project I'm converting from VB.net to C#. I have a datagrid that
uses a textbox for multiline editing; it gets populated fine in
<EditItemTemplate> in VB, but in C# I get the error:

"CS0246: The type or namespace name 'Databinder' could not be found (are you
missing a using directive or an assembly reference?)"

If I remove the <EditItemTemplate> code, the <ItemTemplate> seems to work
fine in C#.

<ItemTemplate>
<asp:label runat="server" style="margin-left:5;margin-right:5" Text='<%#
DataBinder.Eval(Container.DataItem, "Issue") %>' ID="lblIssuetxt"/>
</ItemTemplate>
<EditItemTemplate>
<asp:textbox id="IssueTextbox" Width="350px" TextMode="MultiLine"
Height="70px" text='<%# Databinder.Eval(Container.DataItem, "Issue") %>'
runat="server" />
</EditItemTemplate>

Suggestions? If nothing else, is there another way to populate the textbox
from the code-behind page?
Thanks,
Dave
 
D

Dave Petersen

That was it...thanks!
Let that be a lesson to us sloppy VB programmers...:)

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top