Hi friends,
I have one parent page where i have one grideviwe bind with value
i want to display that gridviwe only when user login into child page
once user login into child page after closing login childpage
& data should be display in gridviwe of Paren page How to doths
plz help me
Thanks
my .aspx code
aspx.cs code
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class queryeditor : System.Web.UI.Page
{
clientinfo objclient = new clientinfo();
public string pageredirect;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string ID = Request.QueryString["0"];
txtqueryexec.Text = "";
}
}
protected void btnexec_Click(object sender, EventArgs e)
{
FillGrid();
}
private void FillGrid()
{
DataSet ds = objclient.get_queryexec(drpdwn_query.SelectedItem.Text, txtqueryexec.Text);
if (ds.Tables[0].Rows.Count > 0)
{
gv_command.Visible = true;
gv_command.DataSource = ds;
gv_command.DataBind();
}
}
protected void drpdwn_query_SelectedIndexChanged(object sender, EventArgs e)
{
string query = drpdwn_query.SelectedItem.Text;
switch(query)
{
case "SELECT":
txtqueryexec.Text = "SELECT * FROM [TABLENAME]";
break;
case "INSERT":
txtqueryexec.Text = "INSERT INTO [TABLENAME] [(col1, col2, col3,...colN)] VALUES (value1, value2, value3,...valueN)";
break;
case "UPDATE":
txtqueryexec.Text = "UPDATE [TABLENAME] SET column_1 = [value1], column_2 = [value2]";
break;
}
}
}
Loading

sagar BhosalePosted Jul 20, 2011, 12:28 AM
my child page code
Jiteendra SampathiraoPosted Jul 20, 2011, 12:20 AM
try working on that......