Hi,
I have defined the User control which containg one label and textbox.
<asp:Label id=”xx” …>
<asp:textbox id=”name” runat=”server”..>
In the user control class I am defining like this:
Class us: System.Web.UI.UserControl
{
Public string setname
{
Get
{
Return name.text;
}
Set
{
Name.text=value;
}
}
Page_load()
{
}
I am using that user control in another aspx page. In which I placed the the above User control in a Wizard control.
<asp:wizard ..>
<tt.name id=”ci”> declaring usercontrol inside wizard.
</asp:wizrd>
From this aspx I am trying to set the value for the name textbox which is in User control when the Wizard Finish button is clicked.
Like this:
protected void Wizard2_FinishButtonClick(object sender, WizardNavigationEventArgs e)
{
ci.setname = "hh";
}
But this event is not firing when I remove the User control from the Wizard this event is firing.
And when I write the Page_load of aspx page
Aspx page page_load
{
If(!isPostaback)
{
ci.setname=”kk”;
}
If I put like this in the PageLoad’s !ispostback then wizrd finish event is workng.
Withoyt setting the ci.setname in the Page_load I need to set only in the finish button click.
How to do this?
Thanks
I have defined the User control which containg one label and textbox.
<asp:Label id=”xx” …>
<asp:textbox id=”name” runat=”server”..>
In the user control class I am defining like this:
Class us: System.Web.UI.UserControl
{
Public string setname
{
Get
{
Return name.text;
}
Set
{
Name.text=value;
}
}
Page_load()
{
}
I am using that user control in another aspx page. In which I placed the the above User control in a Wizard control.
<asp:wizard ..>
<tt.name id=”ci”> declaring usercontrol inside wizard.
</asp:wizrd>
From this aspx I am trying to set the value for the name textbox which is in User control when the Wizard Finish button is clicked.
Like this:
protected void Wizard2_FinishButtonClick(object sender, WizardNavigationEventArgs e)
{
ci.setname = "hh";
}
But this event is not firing when I remove the User control from the Wizard this event is firing.
And when I write the Page_load of aspx page
Aspx page page_load
{
If(!isPostaback)
{
ci.setname=”kk”;
}
If I put like this in the PageLoad’s !ispostback then wizrd finish event is workng.
Withoyt setting the ci.setname in the Page_load I need to set only in the finish button click.
How to do this?
Thanks