I am new for ASP.Net . Now i am looking for ASP.net.I have a doubt.I am using Multiview Property in my Project.
Design Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
void bindata()
{
oledbcon = new OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;Data Source=D:\\Testing.mdb");
SelectString = "Select p.ParentName as [ParentName],c.ChildId as [ChildId],c.ChildName as [ChildName],c.price as [Price],c.accept as [Status] from tbl_Parent_header p,tbl_child_header c where p.parentId=c.ParentId order by p.parentName";
oledbcmd = new OleDbCommand(SelectString, oledbcon);
try
{
oledbcon.Open();
oledbadapter = new OleDbDataAdapter(oledbcmd);
DataSet ds = new DataSet();
oledbadapter.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
oledbcon.Close();
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
protected void LBView1_Click(object sender, EventArgs e)
{
bindata();
}
I just fill a information in the Gridview.It is in multiview Property. My doubt is when i click the Tab One Information is not display in the Gridview .Please Clear my Doubt .
Regards,
Lakshmi Narayanan.S

Jiteendra SampathiraoPosted Jul 7, 2011, 12:52 AM
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
MultiView1.SetActiveView(DefaultView);
}
}
protected void LinkButton_Command(object sender, CommandEventArgs e)
{
switch (e.CommandArgument.ToString())
{
case "DefaultView" :
MultiView1.SetActiveView(DefaultView);
break;
case "News" :
MultiView1.SetActiveView(NewsView);
break;
case "Shopping" :
MultiView1.SetActiveView(ShoppingView);
break;
default :
throw new Exception("You didn't select a valid list item.");
break;
}
}
I hope it solve your problem.....
Jiteendra SampathiraoPosted Jul 7, 2011, 12:43 AM
refer this:
Link1
Link2