Click here to Skip to main content
15,890,897 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: GridDataitem retrival issue Pin
Arindam Tewary20-Apr-10 22:32
professionalArindam Tewary20-Apr-10 22:32 
NewsWindows Azure Free 1 week pass - 19 to 26 April Pin
GoAzure20-Apr-10 11:32
GoAzure20-Apr-10 11:32 
RantRe: Windows Azure Free 1 week pass - 19 to 26 April Pin
Rutvik Dave21-Apr-10 5:23
professionalRutvik Dave21-Apr-10 5:23 
GeneralRe: Windows Azure Free 1 week pass - 19 to 26 April Pin
GoAzure22-Apr-10 9:34
GoAzure22-Apr-10 9:34 
GeneralRe: Windows Azure Free 1 week pass - 19 to 26 April [modified] Pin
GoAzure3-May-10 9:57
GoAzure3-May-10 9:57 
QuestionForce a PostBack? Page will not repopulate after first Click Pin
PDTUM20-Apr-10 6:29
PDTUM20-Apr-10 6:29 
AnswerRe: Force a PostBack? Page will not repopulate after first Click Pin
daveyerwin20-Apr-10 6:50
daveyerwin20-Apr-10 6:50 
GeneralRe: Force a PostBack? Page will not repopulate after first Click Pin
PDTUM20-Apr-10 7:02
PDTUM20-Apr-10 7:02 
Dave,

Thank you for your reply. I have pasted the Page_Load info below. This page is brought up from a click event on another page's GridView and is supposed to populate information accordingly.

protected void Page_Load(object sender, EventArgs e)
    {
        medDate = CreateMedicalDate(medDate);

        //Load the results for the requested AE

        //Pass the values for the selected AE from the AE Summary Page
        id = Request.QueryString["Id"];
        Screening_Number = Request.QueryString["Screening_Number"];
        Site_Number = Request.QueryString["Site_Number"];
        Version_Id = Request.QueryString["Version_Id"];
        Version = Request.QueryString["Version"];
        AE = Request.QueryString["Ae"];
        Serious = Request.QueryString["Serious"];

        GetLastVersion();

        //Create a new SQL Connection Object
        SqlConnection Conn = new SqlConnection(CONNSTR);

        try
        {
            string Sql = "SELECT [Id],[Period] , [Screening_Number] , [Site_Number] , " +
            "[Version_Id],[Version] , [Ae] , [Frequency] , [Visit] , [VisitNumber] , [Date_Onset] , " +
            "[Ongoing] , [Date_Ended] , [CTCAE] , [Serious] , [Related] , [Action] , [Outcome] , " +
            "[NewConMedsY], [NewConMedsN], [SubBy] , [SubOn] , [Sae_Rpt_Status] " +
            "FROM Adverse_Events WHERE [Version_Id] = @Version_Id AND [Version] = @LastVersion ";

            //Set Command Object Headers
            SqlCommand Comm = new SqlCommand(Sql, Conn);
            Comm.CommandType = CommandType.Text;

            //Comm Paramemters
            Comm.Parameters.Clear();
            Comm.Parameters.AddWithValue("@Version_Id", Version_Id);
            Comm.Parameters.AddWithValue("@LastVersion", lastCompletedVersion);

             //Create a Dataset
            SqlDataAdapter da = new SqlDataAdapter(Comm);
            DataSet ds = new DataSet();
            da.Fill(ds);

            //Send results to the controls 
            LabelPeriod.Text = ds.Tables[0].Rows[0]["Period"].ToString();
            LabelScreeningNumber.Text  = ds.Tables[0].Rows[0]["Screening_Number"].ToString();
            LabelVersion.Text = ds.Tables[0].Rows[0]["Version"].ToString();
            LabelId.Text = ds.Tables[0].Rows[0]["Id"].ToString();
            LabelAe.Text = ds.Tables[0].Rows[0]["Ae"].ToString();
            LabelFrequency.Text = ds.Tables[0].Rows[0]["Frequency"].ToString();
            LabelVisit.Text = ds.Tables[0].Rows[0]["Visit"].ToString();
            LabelVisitNum.Text = ds.Tables[0].Rows[0]["VisitNumber"].ToString();
            LabelDateStarted.Text = ds.Tables[0].Rows[0]["Date_Onset"].ToString();
            LabelOngoing.Text = ds.Tables[0].Rows[0]["Ongoing"].ToString();
            LabelDateStopped.Text = ds.Tables[0].Rows[0]["Date_Ended"].ToString();
            LabelCtcae.Text = ds.Tables[0].Rows[0]["CTCAE"].ToString();
            LabelSerious.Text = ds.Tables[0].Rows[0]["Serious"].ToString();
            LabelRelated.Text = ds.Tables[0].Rows[0]["Related"].ToString();
            LabelAction.Text = ds.Tables[0].Rows[0]["Action"].ToString();
            LabelOutcome.Text = ds.Tables[0].Rows[0]["Outcome"].ToString();
            RadioButtonConMedY.Checked = Convert.ToBoolean(ds.Tables[0].Rows[0]["NewConMedsY"].ToString());
            RadioButtonConMedN.Checked = Convert.ToBoolean(ds.Tables[0].Rows[0]["NewConMedsN"].ToString());
            LabelSubBy.Text = Session["Name"].ToString();
            LabelSubOn.Text = medDate;          
            
        }
        catch (Exception ex)  //Catch Errors
        {
            Console.WriteLine("Error : " + ex.Message);
        }

        SetDateDropdownBoxes();

    } 


There is a button on the page that is supposed to decrement a value in the LabelVersion label and re run the Sql thereby re populating the page with new information. As I said, it works on the first click, but not afterwards. Thanks for your attention. Best, Pat
GeneralRe: Force a PostBack? Page will not repopulate after first Click Pin
Not Active20-Apr-10 7:20
mentorNot Active20-Apr-10 7:20 
GeneralRe: Force a PostBack? Page will not repopulate after first Click Pin
PDTUM20-Apr-10 7:39
PDTUM20-Apr-10 7:39 
GeneralRe: Force a PostBack? Page will not repopulate after first Click Pin
Not Active20-Apr-10 8:44
mentorNot Active20-Apr-10 8:44 
AnswerRe: Force a PostBack? Page will not repopulate after first Click Pin
PDTUM20-Apr-10 9:26
PDTUM20-Apr-10 9:26 
GeneralRe: Force a PostBack? Page will not repopulate after first Click Pin
daveyerwin20-Apr-10 7:26
daveyerwin20-Apr-10 7:26 
AnswerRe: Force a PostBack? Page will not repopulate after first Click Pin
PDTUM20-Apr-10 9:27
PDTUM20-Apr-10 9:27 
Questionwhen checkboxes is selected the data should be store in two tables Pin
developerit20-Apr-10 3:16
developerit20-Apr-10 3:16 
AnswerRe: when checkboxes is selected the data should be store in two tables Pin
Brij20-Apr-10 3:30
mentorBrij20-Apr-10 3:30 
AnswerRe: when checkboxes is selected the data should be store in two tables Pin
Ashfield20-Apr-10 9:19
Ashfield20-Apr-10 9:19 
AnswerRe: when checkboxes is selected the data should be store in two tables Pin
nagendrathecoder21-Apr-10 1:22
nagendrathecoder21-Apr-10 1:22 
QuestionCustom control in popups Pin
Michael O.20-Apr-10 1:21
Michael O.20-Apr-10 1:21 
AnswerRe: Custom control in popups Pin
Brij20-Apr-10 1:53
mentorBrij20-Apr-10 1:53 
AnswerRe: Custom control in popups Pin
Jamil Hallal20-Apr-10 21:51
professionalJamil Hallal20-Apr-10 21:51 
QuestionInitializing ASP.NET Pin
Yoyosch20-Apr-10 0:39
Yoyosch20-Apr-10 0:39 
AnswerRe: Initializing ASP.NET Pin
Morgs Morgan20-Apr-10 0:43
Morgs Morgan20-Apr-10 0:43 
GeneralRe: Initializing ASP.NET Pin
Yoyosch20-Apr-10 0:54
Yoyosch20-Apr-10 0:54 
AnswerRe: Initializing ASP.NET Pin
Brij20-Apr-10 0:53
mentorBrij20-Apr-10 0:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.