Jahliah 0 Light Poster

Basically I have two files:
details.html
details.cs

I would like to use details.cs to write values to details.html but the html textbox stays the same.

Would appreciate any help. Thanks!

details.html

<%@ Page Language="C#" 
AutoEventWireup="true" 
CodeBehind="details.cs" 
Inherits="Details.DetailsHTML" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
</head>
<body>
    <form>
        <input id="txt_details" type="text" name="txt_details" runat="server"/>
    </form>
</body>
</html>

details.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.IO;
using System.Text;
using System.Data;

namespace Details
{
    public partial class DetailsHTML : Page
    {
        //Declare controls used
        protected System.Web.UI.HtmlControls.HtmlInputText txt_details;

        protected void Page_Load(object sender, EventArgs e)
        {

            string strValue = Page.Request.Form ["txt_details"].ToString();
            strValue = "test";
            }
        }

        }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.