Click here to Skip to main content
15,896,111 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends,

As i m new to asp .net, i m having problem in assigning value to textbox, which is located in grid view.i want to fill text property to today's date.


If anyone knows...
Give reply..

thanks in advance
Posted
Updated 22-May-12 1:11am
v2
Comments
Sunny_Kumar_ 22-May-12 7:18am    
is it dynamic or static? Also, please share the code.
Code 89 22-May-12 7:19am    
could you post your code which u hav done so far..

Hi ,
Check this
XML
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False">
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                       <asp:Label ID="Label1" runat="server" Text=""><%# DateTime.Now.ToString()%></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>

Best Regards
M.Mitwalli
 
Share this answer
 
ASP.NET
<asp:label id="Label1" runat="server" text="<%#Eval("category") %>" xmlns:asp="#unknown"></asp:label>




the value u get from data base..to label make it for text box
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900