Click here to Skip to main content
15,899,754 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Need to change permision of excel file Pin
S.Aijaz31-Aug-08 20:58
S.Aijaz31-Aug-08 20:58 
QuestionNeed help in choosing an ASP.NET project Pin
Gjm31-Aug-08 15:37
Gjm31-Aug-08 15:37 
AnswerRe: Need help in choosing an ASP.NET project Pin
Gayani Devapriya31-Aug-08 17:32
Gayani Devapriya31-Aug-08 17:32 
AnswerRe: Need help in choosing an ASP.NET project Pin
Abhijit Jana31-Aug-08 18:00
professionalAbhijit Jana31-Aug-08 18:00 
AnswerRe: Need help in choosing an ASP.NET project Pin
Brij31-Aug-08 18:11
mentorBrij31-Aug-08 18:11 
AnswerRe: Need help in choosing an ASP.NET project Pin
N a v a n e e t h31-Aug-08 18:12
N a v a n e e t h31-Aug-08 18:12 
GeneralRe: Need help in choosing an ASP.NET project Pin
Abhijit Jana31-Aug-08 18:20
professionalAbhijit Jana31-Aug-08 18:20 
QuestionDisabling wizard next button Pin
David Kalkwarf31-Aug-08 7:24
David Kalkwarf31-Aug-08 7:24 
I wish to enable/disable the button that moves to the next page in a wizard. I want it initially disabled, then enable it based on a user choice (checkbox acknowledging terms) in the wizard step.

Also, I have other controls I wish to change when the checkbox is changed. Lastly, I only wish to update those few controls and not the entire page.

I started by wrapping the checkbox and other controls to change in an UpdatePanel. This solved my "only update necessary controls" issue. But, I couldn't update the wizard button. So, I wrapped that button in a separate UpdatePanel and updated it from by Checkbox_CheckedChanged function.

This all works fine (only updating necessary controls, enabling/disabling Next button correctly) except that the button to move to the next wizard step no longer works. I presume this is becuase it is wrapped in an UpdatePanel. It appears to actually generate the data for the next steps/pages (hits the database, etc.), but it just doesn't update the page.

Let me see if I can include some meaniningful code:

 <StartNavigationTemplate>
    <asp:UpdatePanel ID="upnlStartButton" runat="server" UpdateMode="Conditional" >
       <ContentTemplate>
          <asp:Button ID="StartNextButton" CommandName="MoveNext" runat="server" AlternateText="Start Writing Letter" Enabled="false" Text="Start Your Letter" />
       </ContentTemplate>
    </asp:UpdatePanel>
 </StartNavigationTemplate>


<WizardSteps>
    <asp:WizardStep runat="server" Title="Terms and Conditions" StepType="Start">
       &nbsp;

       <div style="margin-left: 10px; overflow: auto; width: 559px; height: 350px">
          <asp:Label ID="TermsAndConditionsLBL" runat="server"></asp:Label>

          <br />

          <asp:UpdatePanel ID="UpdatePanel1" runat="server">
             <ContentTemplate>
                <asp:CheckBox ID="agreeTermsCHBX" runat="server" Text="I Agree" AutoPostBack="True" OnCheckedChanged="agreeTermsCBX_CheckedChanged" />

                <br />

                <asp:CheckBox ID="disagreeTermsCHBX" runat="server" Text="I Disagree" AutoPostBack="True" OnCheckedChanged="disagreeTermsCBX_CheckedChanged" />
             </ContentTemplate>
          </asp:UpdatePanel>
       </div>
    </asp:WizardStep>



protected void agreeTermsCBX_CheckedChanged(object sender, EventArgs e)
{
  if (agreeTermsCHBX.Checked)
  {
     disagreeTermsCHBX.Checked = false;

     // enable button (Start Your Letter) to move to next page
     ((Button)findControl(wizard, "StartNextButton")).Enabled = true;

     // update button's panel
     ((UpdatePanel)findControl(wizard, "upnlStartButton")).Update();
  }
}



Is there a way to make the wizard page update? Is there another way to accomplish my task (only update certain controls, enable/disable wizard Next button)? This didn't seem like a diffcult task, I feel like I am missing something obviousConfused | :confused:

Any suggestions are welcome.
AnswerRe: Disabling wizard next button Pin
Abhishek Sur31-Aug-08 20:51
professionalAbhishek Sur31-Aug-08 20:51 
QuestionURGENT--CONFUSED IN TAKING A DECISION Pin
Gjm31-Aug-08 6:03
Gjm31-Aug-08 6:03 
AnswerRe: URGENT--CONFUSED IN TAKING A DECISION Pin
Blue_Boy31-Aug-08 7:42
Blue_Boy31-Aug-08 7:42 
AnswerRe: URGENT--CONFUSED IN TAKING A DECISION Pin
Mujahid Ullah Shaik31-Aug-08 8:25
Mujahid Ullah Shaik31-Aug-08 8:25 
AnswerRe: URGENT--CONFUSED IN TAKING A DECISION Pin
Paul Conrad31-Aug-08 12:34
professionalPaul Conrad31-Aug-08 12:34 
AnswerRe: URGENT--CONFUSED IN TAKING A DECISION Pin
Christian Graus31-Aug-08 12:59
protectorChristian Graus31-Aug-08 12:59 
GeneralRe: URGENT--CONFUSED IN TAKING A DECISION Pin
Perspx31-Aug-08 13:41
Perspx31-Aug-08 13:41 
JokeWHY DIDN'T SOMEONE TELL ME?!?!?! Pin
leckey31-Aug-08 15:30
leckey31-Aug-08 15:30 
QuestionPrinting with ASP.NET Drawing.Printing problem Pin
AmitCBR31-Aug-08 2:58
AmitCBR31-Aug-08 2:58 
QuestionAjax help is needed Pin
Rameez Raja30-Aug-08 17:58
Rameez Raja30-Aug-08 17:58 
AnswerRe: Ajax help is needed Pin
Paul Conrad30-Aug-08 19:03
professionalPaul Conrad30-Aug-08 19:03 
AnswerRe: Ajax help is needed Pin
Abhijit Jana30-Aug-08 21:12
professionalAbhijit Jana30-Aug-08 21:12 
GeneralRe: Ajax help is needed Pin
N a v a n e e t h31-Aug-08 18:20
N a v a n e e t h31-Aug-08 18:20 
AnswerRe: Ajax help is needed Pin
Mujahid Ullah Shaik31-Aug-08 8:30
Mujahid Ullah Shaik31-Aug-08 8:30 
AnswerRe: Ajax help is needed Pin
Abhishek Sur31-Aug-08 9:52
professionalAbhishek Sur31-Aug-08 9:52 
AnswerRe: Ajax help is needed Pin
Gayani Devapriya31-Aug-08 17:40
Gayani Devapriya31-Aug-08 17:40 
Questionupdate database from a querystring data Pin
highjo30-Aug-08 8:11
highjo30-Aug-08 8:11 

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.