Wizard Control Issue

R

raghav

Hi
I am working on ASP.NET 2.0. I am developing a website using Wizard
control. Based on number of steps added, next, previous, finish buttons
generate automatically. After running the application, these button
work automatically, means we can go to next step, previous step by
clicking on corresponding buttons. In my application I have 3 steps. On
Next button click of step 1, I want two things to happen. One is
inserting data of step 1 in DB---Its working.
Secondly I want to go to next step on clicking next button----which
should happen automatically---but its not going to step 2, its staying
in step 1 only. I hope u have understood my problem. Please help me in
solving this small issue...

Regards
Raghav Mahajan
 
T

Tim_Mac

hi raghav,
i understand your post. you must have done something to break the default
behaviour.
post your code and we may be able to see what might be the problem.

tim
 
R

raghav

Hi Tim

Thanks for taking initiative to solve my problem. my code under next
button click is below:-----

protected void Wizard1_NextButtonClick(object sender,
WizardNavigationEventArgs e)
{
string FirstName = string.Empty;
string MiddleName = string.Empty;
string LastName = string.Empty;
string Gender = string.Empty;
string Email = string.Empty;
string Mobile = string.Empty;
string ResumePath = string.Empty;
string Address = string.Empty;
string City = string.Empty;
string State = string.Empty;
string Country = string.Empty;
string Pin = string.Empty;
string Phone = string.Empty;
string Addressp = string.Empty;
string Cityp = string.Empty;
string Statep = string.Empty;
string Countryp = string.Empty;
string Pinp = string.Empty;
string Phonep = string.Empty;
string Hobbies = string.Empty;
string Interests = string.Empty;
string Achievements = string.Empty;
bool IsPermanentAddress = false;

FirstName = txtfname.Text.ToString();
MiddleName = txtmname.Text.ToString();
LastName = txtlname.Text.ToString();
Gender = ddlgender.SelectedItem.Value;
Email = txtemail.Text.ToString();
Mobile = txtmobileno.Text.ToString();
ResumePath = uploadresume.FileName;
Address = txtaddress.Text.ToString();
City = txtcity.Text.ToString();
State = ddlstate.SelectedItem.Value;
Country = ddlcountry.SelectedItem.Value;
Pin = txtpin.Text.ToString();
Phone = txtphoneno.Text.ToString();
Addressp = txtaddressp.Text.ToString();
Cityp = txtcityp.Text.ToString();
Statep = ddlstatep.SelectedItem.Value;
Countryp = ddlcountryp.SelectedItem.Value;
Pinp = txtpinp.Text.ToString();
Phonep = txtphonenop.Text.ToString();
Hobbies = txthobbies.Text.ToString();
Interests = txtinterests.Text.ToString();
Achievements = txtachievements.Text.ToString();
IsPermanentAddress = CheckBox1.Checked;
SqlDataSource3.InsertParameters[0].DefaultValue = FirstName;
SqlDataSource3.InsertParameters[1].DefaultValue = MiddleName;
SqlDataSource3.InsertParameters[2].DefaultValue = LastName;
SqlDataSource3.InsertParameters[3].DefaultValue = gen;
SqlDataSource3.InsertParameters[4].DefaultValue = Email;
SqlDataSource3.InsertParameters[5].DefaultValue = Mobile;
SqlDataSource3.InsertParameters[6].DefaultValue = ResumePath;
SqlDataSource3.InsertParameters[7].DefaultValue = Address;
SqlDataSource3.InsertParameters[8].DefaultValue = City;
SqlDataSource3.InsertParameters[9].DefaultValue = State;
SqlDataSource3.InsertParameters[10].DefaultValue = Country;
SqlDataSource3.InsertParameters[11].DefaultValue = Pin;
SqlDataSource3.InsertParameters[12].DefaultValue = Phone;

SqlDataSource3.InsertParameters[13].DefaultValue = Addressp;
SqlDataSource3.InsertParameters[14].DefaultValue = Cityp;
SqlDataSource3.InsertParameters[15].DefaultValue = Statep;
SqlDataSource3.InsertParameters[16].DefaultValue = Countryp;
SqlDataSource3.InsertParameters[17].DefaultValue = Pinp;
SqlDataSource3.InsertParameters[18].DefaultValue = Phonep;
SqlDataSource3.InsertParameters[19].DefaultValue = Hobbies;
SqlDataSource3.InsertParameters[20].DefaultValue = Interests;
SqlDataSource3.InsertParameters[21].DefaultValue =
Achievements;
SqlDataSource3.InsertParameters[22].DefaultValue
=IsPermanentAddress.ToString();
SqlDataSource3.Insert();
}
this is the code for first step....

Regards
Raghav
 
T

Tim_Mac

hi Raghav,
i added the same event to my simplified example, and it still works fine.

can you post your ASPX markup for the wizard, just in case..

my ASPX looks like this:

<asp:Wizard ID="Wizard1" runat="server"
OnNextButtonClick="Wizard1_NextButtonClick">
<WizardSteps>
<asp:WizardStep runat="server" Title="Step 1">
Hello,
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Step 2">
Have a ,
</asp:WzardStep>
<asp:WizardStep runat="server" Title="Step 3">
Nice day
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>

the code behind then does this:
protected void Wizard1_NextButtonClick(object sender,
WizardNavigationEventArgs e)
{
this.Wizard1.HeaderText = String.Format("Next Step event at {0}",
DateTime.Now.ToLongTimeString());
}

is there anything funny going on in your page_load?

thanks
tim



raghav said:
Hi Tim

Thanks for taking initiative to solve my problem. my code under next
button click is below:-----

protected void Wizard1_NextButtonClick(object sender,
WizardNavigationEventArgs e)
{
string FirstName = string.Empty;
string MiddleName = string.Empty;
string LastName = string.Empty;
string Gender = string.Empty;
string Email = string.Empty;
string Mobile = string.Empty;
string ResumePath = string.Empty;
string Address = string.Empty;
string City = string.Empty;
string State = string.Empty;
string Country = string.Empty;
string Pin = string.Empty;
string Phone = string.Empty;
string Addressp = string.Empty;
string Cityp = string.Empty;
string Statep = string.Empty;
string Countryp = string.Empty;
string Pinp = string.Empty;
string Phonep = string.Empty;
string Hobbies = string.Empty;
string Interests = string.Empty;
string Achievements = string.Empty;
bool IsPermanentAddress = false;

FirstName = txtfname.Text.ToString();
MiddleName = txtmname.Text.ToString();
LastName = txtlname.Text.ToString();
Gender = ddlgender.SelectedItem.Value;
Email = txtemail.Text.ToString();
Mobile = txtmobileno.Text.ToString();
ResumePath = uploadresume.FileName;
Address = txtaddress.Text.ToString();
City = txtcity.Text.ToString();
State = ddlstate.SelectedItem.Value;
Country = ddlcountry.SelectedItem.Value;
Pin = txtpin.Text.ToString();
Phone = txtphoneno.Text.ToString();
Addressp = txtaddressp.Text.ToString();
Cityp = txtcityp.Text.ToString();
Statep = ddlstatep.SelectedItem.Value;
Countryp = ddlcountryp.SelectedItem.Value;
Pinp = txtpinp.Text.ToString();
Phonep = txtphonenop.Text.ToString();
Hobbies = txthobbies.Text.ToString();
Interests = txtinterests.Text.ToString();
Achievements = txtachievements.Text.ToString();
IsPermanentAddress = CheckBox1.Checked;
SqlDataSource3.InsertParameters[0].DefaultValue = FirstName;
SqlDataSource3.InsertParameters[1].DefaultValue = MiddleName;
SqlDataSource3.InsertParameters[2].DefaultValue = LastName;
SqlDataSource3.InsertParameters[3].DefaultValue = gen;
SqlDataSource3.InsertParameters[4].DefaultValue = Email;
SqlDataSource3.InsertParameters[5].DefaultValue = Mobile;
SqlDataSource3.InsertParameters[6].DefaultValue = ResumePath;
SqlDataSource3.InsertParameters[7].DefaultValue = Address;
SqlDataSource3.InsertParameters[8].DefaultValue = City;
SqlDataSource3.InsertParameters[9].DefaultValue = State;
SqlDataSource3.InsertParameters[10].DefaultValue = Country;
SqlDataSource3.InsertParameters[11].DefaultValue = Pin;
SqlDataSource3.InsertParameters[12].DefaultValue = Phone;

SqlDataSource3.InsertParameters[13].DefaultValue = Addressp;
SqlDataSource3.InsertParameters[14].DefaultValue = Cityp;
SqlDataSource3.InsertParameters[15].DefaultValue = Statep;
SqlDataSource3.InsertParameters[16].DefaultValue = Countryp;
SqlDataSource3.InsertParameters[17].DefaultValue = Pinp;
SqlDataSource3.InsertParameters[18].DefaultValue = Phonep;
SqlDataSource3.InsertParameters[19].DefaultValue = Hobbies;
SqlDataSource3.InsertParameters[20].DefaultValue = Interests;
SqlDataSource3.InsertParameters[21].DefaultValue =
Achievements;
SqlDataSource3.InsertParameters[22].DefaultValue
=IsPermanentAddress.ToString();
SqlDataSource3.Insert();
}
this is the code for first step....

Regards
Raghav


Tim_Mac said:
hi raghav,
i understand your post. you must have done something to break the
default
behaviour.
post your code and we may be able to see what might be the problem.

tim
 
R

raghav

Tim
My aspx code is very big, Since I have 5-6 steps in application.
I will tell the main part

<asp:WizardStep runat="server" Title="Personal Profile">
-----some code-----
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Educational Details">
-----some code-----
</asp:WizardStep>
so on.....
Tim I checked the code, these tags are opened and closed properly

I dont know why its not going on step 2

See Tim, I have read that data of all steps will be submitted when
finish button is clicked in final step. But I am inserting data of each
step from that very step only. That might be problem in normal working
of wizard control. But if i will submit the data of all steps in finish
button click, then where I will store data of each step till we reach
finish button in last step. Moreover i cant do like this bec i have
used gridview controls on next steps so that user can make amendments
then and there. So, its imp for me to submit data of each page in DB
separately. these inbult buttons of wizard ctrl should work otherwise
whats use of using wizard ctrl...According to u, what might be the
problem?

Regards
Raghav
</asp:WizardStep>

Tim_Mac said:
hi Raghav,
i added the same event to my simplified example, and it still works fine.

can you post your ASPX markup for the wizard, just in case..

my ASPX looks like this:

<asp:Wizard ID="Wizard1" runat="server"
OnNextButtonClick="Wizard1_NextButtonClick">
<WizardSteps>
<asp:WizardStep runat="server" Title="Step 1">
Hello,
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Step 2">
Have a ,
</asp:WzardStep>
<asp:WizardStep runat="server" Title="Step 3">
Nice day
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>

the code behind then does this:
protected void Wizard1_NextButtonClick(object sender,
WizardNavigationEventArgs e)
{
this.Wizard1.HeaderText = String.Format("Next Step event at {0}",
DateTime.Now.ToLongTimeString());
}

is there anything funny going on in your page_load?

thanks
tim



raghav said:
Hi Tim

Thanks for taking initiative to solve my problem. my code under next
button click is below:-----

protected void Wizard1_NextButtonClick(object sender,
WizardNavigationEventArgs e)
{
string FirstName = string.Empty;
string MiddleName = string.Empty;
string LastName = string.Empty;
string Gender = string.Empty;
string Email = string.Empty;
string Mobile = string.Empty;
string ResumePath = string.Empty;
string Address = string.Empty;
string City = string.Empty;
string State = string.Empty;
string Country = string.Empty;
string Pin = string.Empty;
string Phone = string.Empty;
string Addressp = string.Empty;
string Cityp = string.Empty;
string Statep = string.Empty;
string Countryp = string.Empty;
string Pinp = string.Empty;
string Phonep = string.Empty;
string Hobbies = string.Empty;
string Interests = string.Empty;
string Achievements = string.Empty;
bool IsPermanentAddress = false;

FirstName = txtfname.Text.ToString();
MiddleName = txtmname.Text.ToString();
LastName = txtlname.Text.ToString();
Gender = ddlgender.SelectedItem.Value;
Email = txtemail.Text.ToString();
Mobile = txtmobileno.Text.ToString();
ResumePath = uploadresume.FileName;
Address = txtaddress.Text.ToString();
City = txtcity.Text.ToString();
State = ddlstate.SelectedItem.Value;
Country = ddlcountry.SelectedItem.Value;
Pin = txtpin.Text.ToString();
Phone = txtphoneno.Text.ToString();
Addressp = txtaddressp.Text.ToString();
Cityp = txtcityp.Text.ToString();
Statep = ddlstatep.SelectedItem.Value;
Countryp = ddlcountryp.SelectedItem.Value;
Pinp = txtpinp.Text.ToString();
Phonep = txtphonenop.Text.ToString();
Hobbies = txthobbies.Text.ToString();
Interests = txtinterests.Text.ToString();
Achievements = txtachievements.Text.ToString();
IsPermanentAddress = CheckBox1.Checked;
SqlDataSource3.InsertParameters[0].DefaultValue = FirstName;
SqlDataSource3.InsertParameters[1].DefaultValue = MiddleName;
SqlDataSource3.InsertParameters[2].DefaultValue = LastName;
SqlDataSource3.InsertParameters[3].DefaultValue = gen;
SqlDataSource3.InsertParameters[4].DefaultValue = Email;
SqlDataSource3.InsertParameters[5].DefaultValue = Mobile;
SqlDataSource3.InsertParameters[6].DefaultValue = ResumePath;
SqlDataSource3.InsertParameters[7].DefaultValue = Address;
SqlDataSource3.InsertParameters[8].DefaultValue = City;
SqlDataSource3.InsertParameters[9].DefaultValue = State;
SqlDataSource3.InsertParameters[10].DefaultValue = Country;
SqlDataSource3.InsertParameters[11].DefaultValue = Pin;
SqlDataSource3.InsertParameters[12].DefaultValue = Phone;

SqlDataSource3.InsertParameters[13].DefaultValue = Addressp;
SqlDataSource3.InsertParameters[14].DefaultValue = Cityp;
SqlDataSource3.InsertParameters[15].DefaultValue = Statep;
SqlDataSource3.InsertParameters[16].DefaultValue = Countryp;
SqlDataSource3.InsertParameters[17].DefaultValue = Pinp;
SqlDataSource3.InsertParameters[18].DefaultValue = Phonep;
SqlDataSource3.InsertParameters[19].DefaultValue = Hobbies;
SqlDataSource3.InsertParameters[20].DefaultValue = Interests;
SqlDataSource3.InsertParameters[21].DefaultValue =
Achievements;
SqlDataSource3.InsertParameters[22].DefaultValue
=IsPermanentAddress.ToString();
SqlDataSource3.Insert();
}
this is the code for first step....

Regards
Raghav


Tim_Mac said:
hi raghav,
i understand your post. you must have done something to break the
default
behaviour.
post your code and we may be able to see what might be the problem.

tim


Hi
I am working on ASP.NET 2.0. I am developing a website using Wizard
control. Based on number of steps added, next, previous, finish buttons
generate automatically. After running the application, these button
work automatically, means we can go to next step, previous step by
clicking on corresponding buttons. In my application I have 3 steps. On
Next button click of step 1, I want two things to happen. One is
inserting data of step 1 in DB---Its working.
Secondly I want to go to next step on clicking next button----which
should happen automatically---but its not going to step 2, its staying
in step 1 only. I hope u have understood my problem. Please help me in
solving this small issue...

Regards
Raghav Mahajan
 
T

Tim_Mac

hi Raghav,
i think the Wizard should be able to work for your requirements.
it would still be useful to see your <Wizard ...> opening tag, just in case
you turned off ViewState etc! or if there is something else basic like that
which could be affecting the wizard.

have you debugged to see that the Wizard1_NextButtonClick event is running
correctly. also i would put a try/catch around all the code in this method
to make sure there are no exceptions happening that could be causing
problems. sometimes an exception is not thrown to the screen and you never
know about it, it can get 'swallowed' silently by the control (e.g. I have
seen this with GridView causing problems similar to what you describe here).

let me know how you get on. if it was me, i would try with a new wizard on
a test page, and build it up piece by piece, testing it at every change, to
find the part of your code that breaks the expected functionality.

tim

raghav said:
Tim
My aspx code is very big, Since I have 5-6 steps in application.
I will tell the main part

<asp:WizardStep runat="server" Title="Personal Profile">
-----some code-----
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Educational Details">
-----some code-----
</asp:WizardStep>
so on.....
Tim I checked the code, these tags are opened and closed properly

I dont know why its not going on step 2

See Tim, I have read that data of all steps will be submitted when
finish button is clicked in final step. But I am inserting data of each
step from that very step only. That might be problem in normal working
of wizard control. But if i will submit the data of all steps in finish
button click, then where I will store data of each step till we reach
finish button in last step. Moreover i cant do like this bec i have
used gridview controls on next steps so that user can make amendments
then and there. So, its imp for me to submit data of each page in DB
separately. these inbult buttons of wizard ctrl should work otherwise
whats use of using wizard ctrl...According to u, what might be the
problem?

Regards
Raghav
</asp:WizardStep>

Tim_Mac said:
hi Raghav,
i added the same event to my simplified example, and it still works fine.

can you post your ASPX markup for the wizard, just in case..

my ASPX looks like this:

<asp:Wizard ID="Wizard1" runat="server"
OnNextButtonClick="Wizard1_NextButtonClick">
<WizardSteps>
<asp:WizardStep runat="server" Title="Step 1">
Hello,
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Step 2">
Have a ,
</asp:WzardStep>
<asp:WizardStep runat="server" Title="Step 3">
Nice day
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>

the code behind then does this:
protected void Wizard1_NextButtonClick(object sender,
WizardNavigationEventArgs e)
{
this.Wizard1.HeaderText = String.Format("Next Step event at {0}",
DateTime.Now.ToLongTimeString());
}

is there anything funny going on in your page_load?

thanks
tim



raghav said:
Hi Tim

Thanks for taking initiative to solve my problem. my code under next
button click is below:-----

protected void Wizard1_NextButtonClick(object sender,
WizardNavigationEventArgs e)
{
string FirstName = string.Empty;
string MiddleName = string.Empty;
string LastName = string.Empty;
string Gender = string.Empty;
string Email = string.Empty;
string Mobile = string.Empty;
string ResumePath = string.Empty;
string Address = string.Empty;
string City = string.Empty;
string State = string.Empty;
string Country = string.Empty;
string Pin = string.Empty;
string Phone = string.Empty;
string Addressp = string.Empty;
string Cityp = string.Empty;
string Statep = string.Empty;
string Countryp = string.Empty;
string Pinp = string.Empty;
string Phonep = string.Empty;
string Hobbies = string.Empty;
string Interests = string.Empty;
string Achievements = string.Empty;
bool IsPermanentAddress = false;

FirstName = txtfname.Text.ToString();
MiddleName = txtmname.Text.ToString();
LastName = txtlname.Text.ToString();
Gender = ddlgender.SelectedItem.Value;
Email = txtemail.Text.ToString();
Mobile = txtmobileno.Text.ToString();
ResumePath = uploadresume.FileName;
Address = txtaddress.Text.ToString();
City = txtcity.Text.ToString();
State = ddlstate.SelectedItem.Value;
Country = ddlcountry.SelectedItem.Value;
Pin = txtpin.Text.ToString();
Phone = txtphoneno.Text.ToString();
Addressp = txtaddressp.Text.ToString();
Cityp = txtcityp.Text.ToString();
Statep = ddlstatep.SelectedItem.Value;
Countryp = ddlcountryp.SelectedItem.Value;
Pinp = txtpinp.Text.ToString();
Phonep = txtphonenop.Text.ToString();
Hobbies = txthobbies.Text.ToString();
Interests = txtinterests.Text.ToString();
Achievements = txtachievements.Text.ToString();
IsPermanentAddress = CheckBox1.Checked;
SqlDataSource3.InsertParameters[0].DefaultValue = FirstName;
SqlDataSource3.InsertParameters[1].DefaultValue = MiddleName;
SqlDataSource3.InsertParameters[2].DefaultValue = LastName;
SqlDataSource3.InsertParameters[3].DefaultValue = gen;
SqlDataSource3.InsertParameters[4].DefaultValue = Email;
SqlDataSource3.InsertParameters[5].DefaultValue = Mobile;
SqlDataSource3.InsertParameters[6].DefaultValue = ResumePath;
SqlDataSource3.InsertParameters[7].DefaultValue = Address;
SqlDataSource3.InsertParameters[8].DefaultValue = City;
SqlDataSource3.InsertParameters[9].DefaultValue = State;
SqlDataSource3.InsertParameters[10].DefaultValue = Country;
SqlDataSource3.InsertParameters[11].DefaultValue = Pin;
SqlDataSource3.InsertParameters[12].DefaultValue = Phone;

SqlDataSource3.InsertParameters[13].DefaultValue = Addressp;
SqlDataSource3.InsertParameters[14].DefaultValue = Cityp;
SqlDataSource3.InsertParameters[15].DefaultValue = Statep;
SqlDataSource3.InsertParameters[16].DefaultValue = Countryp;
SqlDataSource3.InsertParameters[17].DefaultValue = Pinp;
SqlDataSource3.InsertParameters[18].DefaultValue = Phonep;
SqlDataSource3.InsertParameters[19].DefaultValue = Hobbies;
SqlDataSource3.InsertParameters[20].DefaultValue = Interests;
SqlDataSource3.InsertParameters[21].DefaultValue =
Achievements;
SqlDataSource3.InsertParameters[22].DefaultValue
=IsPermanentAddress.ToString();
SqlDataSource3.Insert();
}
this is the code for first step....

Regards
Raghav


Tim_Mac wrote:
hi raghav,
i understand your post. you must have done something to break the
default
behaviour.
post your code and we may be able to see what might be the problem.

tim


Hi
I am working on ASP.NET 2.0. I am developing a website using Wizard
control. Based on number of steps added, next, previous, finish
buttons
generate automatically. After running the application, these button
work automatically, means we can go to next step, previous step by
clicking on corresponding buttons. In my application I have 3 steps.
On
Next button click of step 1, I want two things to happen. One is
inserting data of step 1 in DB---Its working.
Secondly I want to go to next step on clicking next button----which
should happen automatically---but its not going to step 2, its
staying
in step 1 only. I hope u have understood my problem. Please help me
in
solving this small issue...

Regards
Raghav Mahajan
 
R

raghav

Hi Tim
I will try all the possible senarios given by u. I will find out the
problem and will definately let u know. Thanks for all efforts and
help.
Regards
Raghav..
Tim_Mac said:
hi Raghav,
i think the Wizard should be able to work for your requirements.
it would still be useful to see your <Wizard ...> opening tag, just in case
you turned off ViewState etc! or if there is something else basic like that
which could be affecting the wizard.

have you debugged to see that the Wizard1_NextButtonClick event is running
correctly. also i would put a try/catch around all the code in this method
to make sure there are no exceptions happening that could be causing
problems. sometimes an exception is not thrown to the screen and you never
know about it, it can get 'swallowed' silently by the control (e.g. I have
seen this with GridView causing problems similar to what you describe here).

let me know how you get on. if it was me, i would try with a new wizard on
a test page, and build it up piece by piece, testing it at every change, to
find the part of your code that breaks the expected functionality.

tim

raghav said:
Tim
My aspx code is very big, Since I have 5-6 steps in application.
I will tell the main part

<asp:WizardStep runat="server" Title="Personal Profile">
-----some code-----
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Educational Details">
-----some code-----
</asp:WizardStep>
so on.....
Tim I checked the code, these tags are opened and closed properly

I dont know why its not going on step 2

See Tim, I have read that data of all steps will be submitted when
finish button is clicked in final step. But I am inserting data of each
step from that very step only. That might be problem in normal working
of wizard control. But if i will submit the data of all steps in finish
button click, then where I will store data of each step till we reach
finish button in last step. Moreover i cant do like this bec i have
used gridview controls on next steps so that user can make amendments
then and there. So, its imp for me to submit data of each page in DB
separately. these inbult buttons of wizard ctrl should work otherwise
whats use of using wizard ctrl...According to u, what might be the
problem?

Regards
Raghav
</asp:WizardStep>

Tim_Mac said:
hi Raghav,
i added the same event to my simplified example, and it still works fine.

can you post your ASPX markup for the wizard, just in case..

my ASPX looks like this:

<asp:Wizard ID="Wizard1" runat="server"
OnNextButtonClick="Wizard1_NextButtonClick">
<WizardSteps>
<asp:WizardStep runat="server" Title="Step 1">
Hello,
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Step 2">
Have a ,
</asp:WzardStep>
<asp:WizardStep runat="server" Title="Step 3">
Nice day
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>

the code behind then does this:
protected void Wizard1_NextButtonClick(object sender,
WizardNavigationEventArgs e)
{
this.Wizard1.HeaderText = String.Format("Next Step event at {0}",
DateTime.Now.ToLongTimeString());
}

is there anything funny going on in your page_load?

thanks
tim



Hi Tim

Thanks for taking initiative to solve my problem. my code under next
button click is below:-----

protected void Wizard1_NextButtonClick(object sender,
WizardNavigationEventArgs e)
{
string FirstName = string.Empty;
string MiddleName = string.Empty;
string LastName = string.Empty;
string Gender = string.Empty;
string Email = string.Empty;
string Mobile = string.Empty;
string ResumePath = string.Empty;
string Address = string.Empty;
string City = string.Empty;
string State = string.Empty;
string Country = string.Empty;
string Pin = string.Empty;
string Phone = string.Empty;
string Addressp = string.Empty;
string Cityp = string.Empty;
string Statep = string.Empty;
string Countryp = string.Empty;
string Pinp = string.Empty;
string Phonep = string.Empty;
string Hobbies = string.Empty;
string Interests = string.Empty;
string Achievements = string.Empty;
bool IsPermanentAddress = false;

FirstName = txtfname.Text.ToString();
MiddleName = txtmname.Text.ToString();
LastName = txtlname.Text.ToString();
Gender = ddlgender.SelectedItem.Value;
Email = txtemail.Text.ToString();
Mobile = txtmobileno.Text.ToString();
ResumePath = uploadresume.FileName;
Address = txtaddress.Text.ToString();
City = txtcity.Text.ToString();
State = ddlstate.SelectedItem.Value;
Country = ddlcountry.SelectedItem.Value;
Pin = txtpin.Text.ToString();
Phone = txtphoneno.Text.ToString();
Addressp = txtaddressp.Text.ToString();
Cityp = txtcityp.Text.ToString();
Statep = ddlstatep.SelectedItem.Value;
Countryp = ddlcountryp.SelectedItem.Value;
Pinp = txtpinp.Text.ToString();
Phonep = txtphonenop.Text.ToString();
Hobbies = txthobbies.Text.ToString();
Interests = txtinterests.Text.ToString();
Achievements = txtachievements.Text.ToString();
IsPermanentAddress = CheckBox1.Checked;
SqlDataSource3.InsertParameters[0].DefaultValue = FirstName;
SqlDataSource3.InsertParameters[1].DefaultValue = MiddleName;
SqlDataSource3.InsertParameters[2].DefaultValue = LastName;
SqlDataSource3.InsertParameters[3].DefaultValue = gen;
SqlDataSource3.InsertParameters[4].DefaultValue = Email;
SqlDataSource3.InsertParameters[5].DefaultValue = Mobile;
SqlDataSource3.InsertParameters[6].DefaultValue = ResumePath;
SqlDataSource3.InsertParameters[7].DefaultValue = Address;
SqlDataSource3.InsertParameters[8].DefaultValue = City;
SqlDataSource3.InsertParameters[9].DefaultValue = State;
SqlDataSource3.InsertParameters[10].DefaultValue = Country;
SqlDataSource3.InsertParameters[11].DefaultValue = Pin;
SqlDataSource3.InsertParameters[12].DefaultValue = Phone;

SqlDataSource3.InsertParameters[13].DefaultValue = Addressp;
SqlDataSource3.InsertParameters[14].DefaultValue = Cityp;
SqlDataSource3.InsertParameters[15].DefaultValue = Statep;
SqlDataSource3.InsertParameters[16].DefaultValue = Countryp;
SqlDataSource3.InsertParameters[17].DefaultValue = Pinp;
SqlDataSource3.InsertParameters[18].DefaultValue = Phonep;
SqlDataSource3.InsertParameters[19].DefaultValue = Hobbies;
SqlDataSource3.InsertParameters[20].DefaultValue = Interests;
SqlDataSource3.InsertParameters[21].DefaultValue =
Achievements;
SqlDataSource3.InsertParameters[22].DefaultValue
=IsPermanentAddress.ToString();
SqlDataSource3.Insert();
}
this is the code for first step....

Regards
Raghav


Tim_Mac wrote:
hi raghav,
i understand your post. you must have done something to break the
default
behaviour.
post your code and we may be able to see what might be the problem.

tim


Hi
I am working on ASP.NET 2.0. I am developing a website using Wizard
control. Based on number of steps added, next, previous, finish
buttons
generate automatically. After running the application, these button
work automatically, means we can go to next step, previous step by
clicking on corresponding buttons. In my application I have 3 steps.
On
Next button click of step 1, I want two things to happen. One is
inserting data of step 1 in DB---Its working.
Secondly I want to go to next step on clicking next button----which
should happen automatically---but its not going to step 2, its
staying
in step 1 only. I hope u have understood my problem. Please help me
in
solving this small issue...

Regards
Raghav Mahajan
 
R

raghav

Hi Tim

As per ur guidelines, I made another small application with two steps.
I have included, 2 controls in step 1 and 2 controls in step 2. Its
working very well. On next button click, its submitting data of step 1
as well as automatically going to step 2 also. One thing to note is
that If I am clicking on next button without making any entries in Text
boxes of step 1, its going to step 2 as I am not using any validations
till now. The dummy application is working well and there also i am
inserting data of step 1 in same manner as in case of main application.
I checked using try/catch block also---Its not throwing any exception.
Moreover viewstate is enabled. Let me see where I am going wrong...
Keep on giving ur views....
But I have to fix it soon.........:)
Regards
Raghav
Tim_Mac said:
hi Raghav,
i think the Wizard should be able to work for your requirements.
it would still be useful to see your <Wizard ...> opening tag, just in case
you turned off ViewState etc! or if there is something else basic like that
which could be affecting the wizard.

have you debugged to see that the Wizard1_NextButtonClick event is running
correctly. also i would put a try/catch around all the code in this method
to make sure there are no exceptions happening that could be causing
problems. sometimes an exception is not thrown to the screen and you never
know about it, it can get 'swallowed' silently by the control (e.g. I have
seen this with GridView causing problems similar to what you describe here).

let me know how you get on. if it was me, i would try with a new wizard on
a test page, and build it up piece by piece, testing it at every change, to
find the part of your code that breaks the expected functionality.

tim

raghav said:
Tim
My aspx code is very big, Since I have 5-6 steps in application.
I will tell the main part

<asp:WizardStep runat="server" Title="Personal Profile">
-----some code-----
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Educational Details">
-----some code-----
</asp:WizardStep>
so on.....
Tim I checked the code, these tags are opened and closed properly

I dont know why its not going on step 2

See Tim, I have read that data of all steps will be submitted when
finish button is clicked in final step. But I am inserting data of each
step from that very step only. That might be problem in normal working
of wizard control. But if i will submit the data of all steps in finish
button click, then where I will store data of each step till we reach
finish button in last step. Moreover i cant do like this bec i have
used gridview controls on next steps so that user can make amendments
then and there. So, its imp for me to submit data of each page in DB
separately. these inbult buttons of wizard ctrl should work otherwise
whats use of using wizard ctrl...According to u, what might be the
problem?

Regards
Raghav
</asp:WizardStep>

Tim_Mac said:
hi Raghav,
i added the same event to my simplified example, and it still works fine.

can you post your ASPX markup for the wizard, just in case..

my ASPX looks like this:

<asp:Wizard ID="Wizard1" runat="server"
OnNextButtonClick="Wizard1_NextButtonClick">
<WizardSteps>
<asp:WizardStep runat="server" Title="Step 1">
Hello,
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Step 2">
Have a ,
</asp:WzardStep>
<asp:WizardStep runat="server" Title="Step 3">
Nice day
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>

the code behind then does this:
protected void Wizard1_NextButtonClick(object sender,
WizardNavigationEventArgs e)
{
this.Wizard1.HeaderText = String.Format("Next Step event at {0}",
DateTime.Now.ToLongTimeString());
}

is there anything funny going on in your page_load?

thanks
tim



Hi Tim

Thanks for taking initiative to solve my problem. my code under next
button click is below:-----

protected void Wizard1_NextButtonClick(object sender,
WizardNavigationEventArgs e)
{
string FirstName = string.Empty;
string MiddleName = string.Empty;
string LastName = string.Empty;
string Gender = string.Empty;
string Email = string.Empty;
string Mobile = string.Empty;
string ResumePath = string.Empty;
string Address = string.Empty;
string City = string.Empty;
string State = string.Empty;
string Country = string.Empty;
string Pin = string.Empty;
string Phone = string.Empty;
string Addressp = string.Empty;
string Cityp = string.Empty;
string Statep = string.Empty;
string Countryp = string.Empty;
string Pinp = string.Empty;
string Phonep = string.Empty;
string Hobbies = string.Empty;
string Interests = string.Empty;
string Achievements = string.Empty;
bool IsPermanentAddress = false;

FirstName = txtfname.Text.ToString();
MiddleName = txtmname.Text.ToString();
LastName = txtlname.Text.ToString();
Gender = ddlgender.SelectedItem.Value;
Email = txtemail.Text.ToString();
Mobile = txtmobileno.Text.ToString();
ResumePath = uploadresume.FileName;
Address = txtaddress.Text.ToString();
City = txtcity.Text.ToString();
State = ddlstate.SelectedItem.Value;
Country = ddlcountry.SelectedItem.Value;
Pin = txtpin.Text.ToString();
Phone = txtphoneno.Text.ToString();
Addressp = txtaddressp.Text.ToString();
Cityp = txtcityp.Text.ToString();
Statep = ddlstatep.SelectedItem.Value;
Countryp = ddlcountryp.SelectedItem.Value;
Pinp = txtpinp.Text.ToString();
Phonep = txtphonenop.Text.ToString();
Hobbies = txthobbies.Text.ToString();
Interests = txtinterests.Text.ToString();
Achievements = txtachievements.Text.ToString();
IsPermanentAddress = CheckBox1.Checked;
SqlDataSource3.InsertParameters[0].DefaultValue = FirstName;
SqlDataSource3.InsertParameters[1].DefaultValue = MiddleName;
SqlDataSource3.InsertParameters[2].DefaultValue = LastName;
SqlDataSource3.InsertParameters[3].DefaultValue = gen;
SqlDataSource3.InsertParameters[4].DefaultValue = Email;
SqlDataSource3.InsertParameters[5].DefaultValue = Mobile;
SqlDataSource3.InsertParameters[6].DefaultValue = ResumePath;
SqlDataSource3.InsertParameters[7].DefaultValue = Address;
SqlDataSource3.InsertParameters[8].DefaultValue = City;
SqlDataSource3.InsertParameters[9].DefaultValue = State;
SqlDataSource3.InsertParameters[10].DefaultValue = Country;
SqlDataSource3.InsertParameters[11].DefaultValue = Pin;
SqlDataSource3.InsertParameters[12].DefaultValue = Phone;

SqlDataSource3.InsertParameters[13].DefaultValue = Addressp;
SqlDataSource3.InsertParameters[14].DefaultValue = Cityp;
SqlDataSource3.InsertParameters[15].DefaultValue = Statep;
SqlDataSource3.InsertParameters[16].DefaultValue = Countryp;
SqlDataSource3.InsertParameters[17].DefaultValue = Pinp;
SqlDataSource3.InsertParameters[18].DefaultValue = Phonep;
SqlDataSource3.InsertParameters[19].DefaultValue = Hobbies;
SqlDataSource3.InsertParameters[20].DefaultValue = Interests;
SqlDataSource3.InsertParameters[21].DefaultValue =
Achievements;
SqlDataSource3.InsertParameters[22].DefaultValue
=IsPermanentAddress.ToString();
SqlDataSource3.Insert();
}
this is the code for first step....

Regards
Raghav


Tim_Mac wrote:
hi raghav,
i understand your post. you must have done something to break the
default
behaviour.
post your code and we may be able to see what might be the problem.

tim


Hi
I am working on ASP.NET 2.0. I am developing a website using Wizard
control. Based on number of steps added, next, previous, finish
buttons
generate automatically. After running the application, these button
work automatically, means we can go to next step, previous step by
clicking on corresponding buttons. In my application I have 3 steps.
On
Next button click of step 1, I want two things to happen. One is
inserting data of step 1 in DB---Its working.
Secondly I want to go to next step on clicking next button----which
should happen automatically---but its not going to step 2, its
staying
in step 1 only. I hope u have understood my problem. Please help me
in
solving this small issue...

Regards
Raghav Mahajan
 
T

Tim_Mac

hi raghav,
i'm all out of ideas. all i can suggest is that you build up your working
sample until it does exactly what you want. when it stops working as you
expect it to, pinpoint exacatly what step broke it, and then maybe i could
help.

tim
 
B

bhakta.ram

I have user control in the second step of the wizard and it does not
show up on the next click.

Thanks
 
T

Tim_Mac

hi,
since it's a new issue i'd suggest you write a new post. this one has 10
replies already!

does the user control show up if you move it outside the wizard?

tim
 
R

raghav

Hi Tim

Hope u are doing good.I am fine too. That issue is resolved. I was busy
in writing some oracle queries, so yesterday only I got time to work on
Wizard control issue. As per ur guidelines, I added controls in new
application which was working fine. In other words I made new
application but not able to fix old application. U were right,
something has happened, which has affected the default behaviour of
wizard control. Any ways, Thank you very much for helping me. Thanks
for spending ur precious time for me.. Hope to meet u in some new
issues in future....
Bye
Raghav
 
T

Tim_Mac

hi Raghav,
no worries. glad i could help out, even if i wasn't able to pinpoint the
exact problem.

good luck
tim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top