-----------------------------------------------------------
New Message on MumbaiUserGroup
-----------------------------------------------------------
From: CodingFreak
Message 5 in Discussion
Hi chandrakant,
Try the following: 1. Add a public property in the page (assuming SourcePage)
containing the DataGrid
public DataGrid GridWithData
{
get
{
return DataGrid1;
}
} 2. Call the next Page (DestPage) by calling the Transfer method of the Server
object
private void Button1_Click(object sender, System.EventArgs e)
{
Server.Transfer("DestPage.aspx");
} 3. Now on the page where the control is transferred (DestPage) add the following
in the Page_Load event:
private void Page_Load(object sender, System.EventArgs e)
{
if (!IsPostBack)
{
SourcePage srcpage = (SourcePage) Context.Handler;
DataGrid1.DataSource = srcpage.GridData.DataSource;
DataGrid1.DataBind();
} Using the above code (srcpage.GridData) you can access the Grid control present on
SourcePage along with its data. In the above example I have used a datagrid on
DestPage to show the data similar to the data contained in the Grid on SourcePage
(DataGrid1.DataSource = srcpage.GridData.DataSource;)
Regards.
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]