Dear friends,
Here, i've used
public static string A; variable in my application.
Suppose, user1 hav A="1" and now user2 come to this form and he has A=2.
So, in this case original value of A for user1(which is A=1) replaced with user2(which is now A=2), But i want to keep both of the value saprately for both the users..
Note :
1) i used
public string A; but during postback it lost its value.
i dont want to use session variable for this.
sample coding part for reference-->
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Data.SqlTypes;
using System.Data.SqlClient;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CrystalDecisions.Web;
using CrystalDecisions.Shared;
using CrystalDecisions.CrystalReports.Engine;
public partial class PO_REG : System.Web.UI.Page
{
public static string A;
public static string _print;
public void Page_Init(object sender, EventArgs e)
{
if (_print == "P")
{
ViewReport();
}
}
#endregion
protected void btnShowReport_Click(object sender, ImageClickEventArgs e)
{
_print = "P";
A = Rdbtn.SelectedValue;
ViewReport()
}
private void ViewReport()
{
ReportDocument crystalReport = new ReportDocument();
if (A == "1")
{
crystalReport.Load(Server.MapPath("sample1.rpt"));
}
else if (A == "2")
{
crystalReport.Load(Server.MapPath("sample2.rpt"));
}
}
any help would be highly appriciated....
thank you.