i have username and password field
username admin
password aaa
when i submit the button it goes to another screen as follows.in username and password i want the above username and password in corresponding field.
Username admin
password aaa
old password aaa
New password xxx
type in drop down list(active,Inactive)
Loading
Satyapriya NayakPosted Mar 3, 2012, 3:51 AM
Try this...
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication11._Default" %>
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace WebApplication11
{
public partial class _Default : System.Web.UI.Page
{
string url;
protected void Button1_Click(object sender, EventArgs e)
{
url = "second.aspx?name=" + TextBox1.Text + " &pass=" +TextBox2.Text;
Response.Redirect(url);
}
}
}
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="second.aspx.cs" Inherits="WebApplication11.second" %>
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace WebApplication11
{
public partial class second : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
TextBox1.Text = Request.QueryString["name"];
TextBox2.Text = Request.QueryString["pass"];
}
}
}
Thanks
If this post helps you mark it as answer