public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { djfdl(); } private void djfdl() { SqlDataAdapter adp = new SqlDataAdapter("select * from thousand", ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); DataList1.DataSource = ds; DataList1.DataBind(); } protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e) { Response.Redirect("MasterPage.master-Default.aspx?pid="+e.CommandArgument.ToString()); } }
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using System.Configuration; public partial class Default2 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { datab(); } private void datab() { string qry = "select * from thousand where pid=" + Request.QueryString["pid"].ToString(); SqlDataAdapter adp = new SqlDataAdapter(qry, ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); DetailsView1.DataSource = ds; DetailsView1.DataBind(); } }
IMGoBJ.Id = Convert.ToInt32(e.CommandArgument); Response.Redirect("~/Pages/rajeeshmenoth.aspx?Qry=" + IMGoBJ.Id); // second page..page load objNews.Id = Convert.ToInt32(Request.QueryString["Qry"]);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)