programming we consider all important topic for knowledge about controls,web Services, JSON, Ajax, database, and interview related Question. In this and sql server tutorial blog we give many examples of jquery as like How Play YouTube Video in Your Website by URL, How to Play YouTube Videos in by using Jquery , Jquery Change div background on mouseover in , JQuery UI Datepicker (Calendar) etc.

Monday, September 9, 2013

How to Set the current data into Asp text box

How to Set the current data into Asp text box in programming:

In programming it is very simple that u set the current date in specific format . if u want to set the current date in time and date both the

Code of aspx page

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Label_Control.aspx.cs" Inherits="Label_Control" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">
    <div><h1>&nbsp;Get time and date</h1>

        <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
        <br />
        <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />


Code of aspx.cs  page

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Label_Control : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e)


    protected void Button1_Click(object sender, EventArgs e)
        Label1.Text =System.DateTime.Now.ToString();