Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is the class
C#
public class Transition
{
// default constructor   
    public Transition()
    {
        if (StageId == 0)
        {
_queryString = "SELECT PHASE, FROM_STAGE, TO_STAGE, END_REASON FROM     Dbase WHERE PHASE='Complaint'";
        }
        else if (StageId > 0)
        {
_queryString = string.Format("SELECT PHASE, FROM_STAGE, TO_STAGE, END_REASON FROM Dbase WHERE PHASE='Complaint' AND STAGE_FROM_ID={0}",StageId);
               
        }
     }
    
// getters and setters for quesry string
public string QueryString
        { 
            get { return _queryString; }
            set { _queryString = value;}
        }
// getters and setters for stage id
public int StageId
        {
    private get { return _stageId; }
            set { _stageId = value; }
        }
    
 
// The variables  
private string _queryString;
private int    _stageId;
private string _fillDropdownList;     

// This is where I call the class.

ublic partial class GridGroupControl : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
       
        
        Transition trns = new Transition();
        trns.StageId =1672;
        SqlDataSource1.SelectCommand = trns.QueryString;

    }


It worked fine yesterday but today when I change the stage id in codebehisnd file it still brings the old result no change.what ever I do it just bring the old results.loks like its caching. I don't know why?
Posted
Updated 10-Aug-11 3:07am
v2
Comments
dan!sh 10-Aug-11 9:12am    
Clean and rebuild helps? Try cleaning Temporary ASP.Net files.

If you have direct access to the database in question, just open it in Management Studio(if it is MSSQL) and run the query directly there. If the data that comes up in there is the same as what you display, then you haven't got an issue in your application. If the data is different, take d@anish's advice and perform a clean an rebuild/clear Temporary ASP.Net files.
 
Share this answer
 
Clean your project or delete "bin" folder in your project folder and rebuild all
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900