Showing posts with label table. Show all posts
Showing posts with label table. Show all posts
May 20, 2010
Merging three table fields using DataBinder.Eval to display in a label control (ASP.NET, C#)
<asp:Label ID="lbl_Address" runat="server" Text=’<%# DataBinder.Eval(Container.DataItem,"Location")+ ", " +DataBinder.Eval(Container.DataItem,"City") +", " +DataBinder.Eval(Container.DataItem,"State")%>’ ></asp:Label>
Labels:
ASP.NET,
c#,
Container,
Container.DataItem,
DataBinder,
DataBinder.Eval,
DataItem,
Eval,
fields,
label control,
Merging,
table
May 19, 2010
Set a field of table to do auto entry as the current date when Inserting a new record in Micrososft SQL Server 2005
There are 2 simple ways to do it:
Method 1:
Complete the following steps and you are done:
You can use getdate() function in the insert query too.
Method 1:
Complete the following steps and you are done:
- Right click on the name of table
- select design
- click on field where you want to create auto entry of current date
- now look in the “Column Properties” window
- Under the General group there is property called “Default value or Bindind”
- in that type in “(getdate())” and save.
You can use getdate() function in the insert query too.
Subscribe to:
Posts (Atom)