Click here to Skip to main content
12,700,965 members (30,760 online)


QuestionFile Upload Component...? Pin
Jassim Rahma28-Dec-12 10:44
memberJassim Rahma28-Dec-12 10:44 
AnswerRe: File Upload Component...? Pin
Sandeep Mewara28-Dec-12 22:14
mvpSandeep Mewara28-Dec-12 22:14 
QuestionCan we make a application to update FB status? Pin
anubhaw.gupta28-Dec-12 7:18
memberanubhaw.gupta28-Dec-12 7:18 
AnswerRe: Can we make a application to update FB status? Pin
Sandeep Mewara28-Dec-12 22:10
mvpSandeep Mewara28-Dec-12 22:10 
QuestionLive Streaming Broadcasting Pin
AhmedYehiaK28-Dec-12 4:19
memberAhmedYehiaK28-Dec-12 4:19 
AnswerRe: Live Streaming Broadcasting Pin
Sandeep Mewara28-Dec-12 22:05
mvpSandeep Mewara28-Dec-12 22:05 
GeneralRe: Live Streaming Broadcasting Pin
AhmedYehiaK29-Dec-12 1:03
memberAhmedYehiaK29-Dec-12 1:03 
QuestionHow to show the previous selected checked box in previous page in Pin
Arun kumar Gautam28-Dec-12 1:18
memberArun kumar Gautam28-Dec-12 1:18 
I m making an online examination page on this page i created a gridview with paging when i go on next page thn aftr selecting options of answer of any question i m going on to another page. but when i come back on this previous page i cant see the previously selected answers the gridview page is refreshed thn, Please help me in it.
    <div id="timer" style="float:right;">
    <label id="tim" style="font-size:15px;"></label>
    <asp:ScriptManager ID="scrpt1" runat="server"></asp:ScriptManager>
    <asp:UpdatePanel ID="updt" runat="server" UpdateMode="Conditional">
    <asp:GridView ID="examgrid" runat="server" AllowPaging="true" 
            AutoGenerateColumns="false" onrowdatabound="examgrid_RowDataBound" 
            PageSize="2" onpageindexchanging="examgrid_PageIndexChanging" 
            PageIndex="10" Width="528px" EnableViewState="false" 
            onpageindexchanged="examgrid_PageIndexChanged" onload="examgrid_Load">
    <asp:TemplateField HeaderText="Question">
    <asp:Label ID="ques" runat="server" Text='<%#Eval("Ques_Name") %>'></asp:Label>
    <asp:HiddenField ID="Question_Id" runat="server" Value='<%#Eval("Ques_Id") %>' /><br /><br />
    <asp:RadioButton ID="opt1" runat="server" GroupName="Radio" Text='<%#Eval("Option1") %>'/>
    <br />
    <asp:RadioButton ID="opt2" runat="server" GroupName="Radio" Text='<%#Eval("Option2") %>'/>
    <br />
    <asp:RadioButton ID="opt3" runat="server" GroupName="Radio" Text='<%#Eval("Option3") %>' />
    <br />
    <asp:RadioButton ID="opt4" runat="server" GroupName="Radio" Text='<%#Eval("Option4") %>'/>
    <br />
    <asp:HiddenField ID="hidvalue" runat="server" EnableViewState="true" />
    <asp:Button ID="Submitbtn" runat="server" Text="Submit" style="float:right;" 

and here is my c# code in gridview paging

protected void examgrid_RowCommand(object sender, GridViewCommandEventArgs e)
        DBClass db = new DBClass();
        //hidvalue.Value = Convert.ToString(x);
        for (int i = 0; i < examgrid.Rows.Count; i++)
            Label question = (Label)examgrid.Rows[i].Cells[0].FindControl("ques");
            HiddenField quesid = (HiddenField)examgrid.Rows[i].Cells[0].FindControl("Question_Id");
            RadioButton rd1 = (RadioButton)examgrid.Rows[i].Cells[0].FindControl("opt1");
            RadioButton rd2 = (RadioButton)examgrid.Rows[i].Cells[0].FindControl("opt2");
            RadioButton rd3 = (RadioButton)examgrid.Rows[i].Cells[0].FindControl("opt3");
            RadioButton rd4 = (RadioButton)examgrid.Rows[i].Cells[0].FindControl("opt4");
            string user = "Arun";
            if (rd1.Checked == true || rd2.Checked == true || rd3.Checked == true || rd4.Checked == true)
                if (rd1.Checked == true)
                    db.InsAnswer(user, question.Text, rd1.Text);
                    if (rd2.Checked == true)
                        db.InsAnswer(user, question.Text, rd2.Text);
                    else if (rd3.Checked == true)
                        db.InsAnswer(user, question.Text, rd3.Text);
                    else if (rd4.Checked == true)
                        db.InsAnswer(user, question.Text, rd4.Text);
                for (int j = 0; j < examgrid.Rows.Count; j++)
                    Label ques = (Label)examgrid.Rows[j].Cells[0].FindControl("ques");
                    int y = db.select_QuestionId(ques.Text);
                    string selected_option = db.Select_Ansqwer(question.Text, user);

                    if (Session["selectedOption_"+y+"_Answer"]==selected_option )
                        if (selected_option == rd1.Text)
                            rd1.Checked = true;
                        else if (selected_option == rd2.Text)
                            rd2.Checked = true;
                        else if (selected_option == rd3.Text)
                            rd3.Checked = true;
                        else if (selected_option == rd4.Text)
                            rd4.Checked = true;


AnswerRe: How to show the previous selected checked box in previous page in Pin
Sandeep Mewara28-Dec-12 22:17
mvpSandeep Mewara28-Dec-12 22:17 
GeneralRe: How to show the previous selected checked box in previous page in Pin
Arun kumar Gautam29-Dec-12 2:16
memberArun kumar Gautam29-Dec-12 2:16 
GeneralRe: How to show the previous selected checked box in previous page in Pin
anubhaw.gupta29-Dec-12 8:04
memberanubhaw.gupta29-Dec-12 8:04 
QuestionMicrosoft Sync Framework for File (Client) and SQL Server Database (Server) synchronization Pin
Ajeet mittal27-Dec-12 18:27
memberAjeet mittal27-Dec-12 18:27 
QuestionWhat is the web.config for the <smtp> ? Pin
alihusain_7727-Dec-12 10:38
memberalihusain_7727-Dec-12 10:38 
AnswerRe: What is the web.config for the <smtp> ? Pin
Richard MacCutchan27-Dec-12 23:02
mvpRichard MacCutchan27-Dec-12 23:02 
AnswerRe: What is the web.config for the <smtp> ? Pin
CommDev28-Dec-12 22:38
memberCommDev28-Dec-12 22:38 
QuestionImage album category wise Pin
Member 776731127-Dec-12 8:30
memberMember 776731127-Dec-12 8:30 
AnswerRe: Image album category wise Pin
Sandeep Mewara28-Dec-12 22:24
mvpSandeep Mewara28-Dec-12 22:24 
QuestionCapsLock detection Pin
tpkpradeep27-Dec-12 1:04
membertpkpradeep27-Dec-12 1:04 
AnswerRe: CapsLock detection Pin
AnalogNerd27-Dec-12 4:56
memberAnalogNerd27-Dec-12 4:56 
AnswerRe: CapsLock detection Pin
CommDev28-Dec-12 22:50
memberCommDev28-Dec-12 22:50 
QuestionApplication Layering Pin
Omersayeed26-Dec-12 3:31
memberOmersayeed26-Dec-12 3:31 
QuestionSyntax error in store procedure Pin
anubhaw.gupta25-Dec-12 23:06
memberanubhaw.gupta25-Dec-12 23:06 
AnswerRe: Syntax error in store procedure Pin
Sravanthid2825-Dec-12 23:21
memberSravanthid2825-Dec-12 23:21 
GeneralRe: Syntax error in store procedure Pin
anubhaw.gupta25-Dec-12 23:40
memberanubhaw.gupta25-Dec-12 23:40 
AnswerRe: Syntax error in store procedure Pin
anubhaw.gupta25-Dec-12 23:45
memberanubhaw.gupta25-Dec-12 23:45 

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.

Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 23 Jan 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid