l HOW TO ACCESS HTML CONTROL INSIDE DOTNET FRAMEWORK ? (DATAHTML.ASPX)

 DAY - 18-06-2025

 

HOW TO ACCESS HTML CONTROL INSIDE DOTNET FRAMEWORK ? (DATAHTML.ASPX)

 

 

<asp:Button ID="Button1" runat="server" Text="DISPLAY" OnClick="Button1_Click" /> 

 

            <input type="text" id="T1" runat="server" />

 

 

 

 string msg = Request.Form["T1"];  // here this from is now has element of html so we are using [] bracket

 

        Response.Write(msg);

 

 

 

Date time conversion:-

For this concept we have to use culture info library.

 

 

// create date time object

 

        DateTime dt = DateTime.ParseExact(TextBox1.Text,"yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture);// parseexact use to convert date

 

        string dateinfo = dt.ToString("dd/MM/yyyy");

 

        Label1.Text = dateinfo.ToString();

 

Create directory runtime.

 

        Directory.CreateDirectory(Request.MapPath(TextBox2.Text)  + "/");

 

        Response.Write("directory created");

 

 

 

 

 

 

 

 

 

 

Assigment task-1

4 four in datbase roll name dirname filename 

Comments

Popular posts from this blog

ViewState for state management

Database joining

INTRODUCTION OF C#