M
M. Ali Qureshi
Hi,
I have a button in StartNavigationTemplate of a Wizard. The wizard itself is
placed in a View of MultiView.
I want to change the text of this button dynamically on Page_Load or
Wizard_Load.
How can i do that?
Here is what i have been trying:
<asp:MultiView ID="WizView" runat="server">
<asp:View ID="WeightView" runat="server">
<asp
anel ID="Panel1" runat="server"
CssClass="RaterHeading">Heading here...</asp
anel>
' There is another wizard here.
</asp:View>
<asp:View ID="HitRaterView" runat="server">
<asp
anel ID="RaterHeading" runat="server"
CssClass="RaterHeading">Heading here...</asp
anel>
<asp:Wizard ID="HitRaterWiz" runat="server">
<StartNavigationTemplate>
<asp:Button ID="HitRaterStartBackButton" runat="server"
Text="Tilbag til vægtning" CssClass="button"
onclick="HitRaterStartBackButton_Click" />
<asp:Button ID="HitRaterStartNextButton" runat="server"
Text="Næste" CssClass="button" onclick="HitRaterGoForward"
ValidationGroup="HitValidator" />
</StartNavigationTemplate>
</asp:Wizard>
<div style="float:right;">
<asp:Label ID="HitRaterBackResult" runat="server"
CssClass="ErrorMessage" EnableViewState="false"></asp:Label>
</div>
</asp:View>
</asp:MultiView>
I am trying to change the button text on Wizard_Load as following:
Protected Sub HitRaterWiz_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles HitRaterWiz.Load
Dim SButton As Button =
HitRaterWiz.FindControl("HitRaterStartBackButton")
SButton.Text = "Changed"
End Sub
But it gives me the following error:
Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.
Any help will be appriciated... thanks
/MAQ
I have a button in StartNavigationTemplate of a Wizard. The wizard itself is
placed in a View of MultiView.
I want to change the text of this button dynamically on Page_Load or
Wizard_Load.
How can i do that?
Here is what i have been trying:
<asp:MultiView ID="WizView" runat="server">
<asp:View ID="WeightView" runat="server">
<asp
CssClass="RaterHeading">Heading here...</asp
' There is another wizard here.
</asp:View>
<asp:View ID="HitRaterView" runat="server">
<asp
CssClass="RaterHeading">Heading here...</asp
<asp:Wizard ID="HitRaterWiz" runat="server">
<StartNavigationTemplate>
<asp:Button ID="HitRaterStartBackButton" runat="server"
Text="Tilbag til vægtning" CssClass="button"
onclick="HitRaterStartBackButton_Click" />
<asp:Button ID="HitRaterStartNextButton" runat="server"
Text="Næste" CssClass="button" onclick="HitRaterGoForward"
ValidationGroup="HitValidator" />
</StartNavigationTemplate>
</asp:Wizard>
<div style="float:right;">
<asp:Label ID="HitRaterBackResult" runat="server"
CssClass="ErrorMessage" EnableViewState="false"></asp:Label>
</div>
</asp:View>
</asp:MultiView>
I am trying to change the button text on Wizard_Load as following:
Protected Sub HitRaterWiz_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles HitRaterWiz.Load
Dim SButton As Button =
HitRaterWiz.FindControl("HitRaterStartBackButton")
SButton.Text = "Changed"
End Sub
But it gives me the following error:
Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.
Any help will be appriciated... thanks
/MAQ