向导控制问题 [英] Wizard Control Issue

查看:73
本文介绍了向导控制问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在研究ASP.NET 2.0。我正在使用Wizard

控制开发一个网站。根据添加的步数,下一个,上一个,完成按钮

自动生成。运行应用程序后,这些按钮

自动工作,意味着我们可以进入下一步,上一步按

点击相应的按钮。在我的应用程序中,我有3个步骤。在

单击下一步按钮,我想要做两件事。一个是

在DB中插入第1步的数据---它正在工作。

其次我想点击下一步按钮进入下一步----哪个

应该自动发生---但它不会进入第2步,它只会在步骤1中停留

。我希望你能理解我的问题。请帮助我

解决这个小问题...


问候

Raghav Mahajan

解决方案

嗨raghav,

i了解你的帖子。你必须做些什么来打破默认的

行为。

发布你的代码,我们可能会看到可能出现的问题。

tim

" raghav" < ma ******** @ gmail.comwrote in message

news:11 ********************** @ d34g2000cwd.googlegr oups.com ...




我正在研究ASP.NET 2.0。我正在使用Wizard

控制开发一个网站。根据添加的步数,下一个,上一个,完成按钮

自动生成。运行应用程序后,这些按钮

自动工作,意味着我们可以进入下一步,上一步按

点击相应的按钮。在我的应用程序中,我有3个步骤。在

单击下一步按钮,我想要做两件事。一个是

在DB中插入第1步的数据---它正在工作。

其次我想点击下一步按钮进入下一步----哪个

应该自动发生---但它不会进入第2步,它只会在步骤1中停留

。我希望你能理解我的问题。请帮助我

解决这个小问题...


问候

Raghav Mahajan



嗨Tim


感谢您主动解决我的问题。我的代码在下一个

按钮点击如下:-----


protected void Wizard1_NextButtonClick(对象发送者,

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 = st ring.Empty;

string Interests = string.Empty;

string Achievements = string.Empty;

bool IsPermanentAddress = false;


FirstName = txtfname.Text.ToString();

MiddleName = txtmname.Text.ToString();

LastName = txtlname.Text .ToString();

性别= ddlgender.SelectedItem.Value;

Email = txtemail.Text.ToString();

Mobile = txtmobileno .Text.ToString();

ResumePath = uploadresume.FileName;

地址= 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.Te xt.ToString();

Phonep = txtphonenop.Text.ToString();

Hobbies = txthobbies.Text.ToString();

兴趣= txtinterests.Text.ToString();

成就= 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 =电子邮件;

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.I nsertParameters [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 =兴趣;

SqlDataSource3.InsertParameters [21] .DefaultValue =

成就;

SqlDataSource3.InsertParameters [22] .DefaultValue

= IsPermanentAddress.ToString();

SqlDataSource3.Insert();

}

这是第一步的代码....


问候

Raghav

Tim_Mac写道:
< blockquote class =post_quotes>
hi raghav,

i了解你的帖子。你必须做些什么来打破默认的

行为。

发布你的代码,我们可能会看到可能出现的问题。

tim


" raghav" < ma ******** @ gmail.comwrote in message

news:11 ********************** @ d34g2000cwd.googlegr oups.com ...




我正在研究ASP.NET 2.0。我正在使用Wizard

控制开发一个网站。根据添加的步数,下一个,上一个,完成按钮

自动生成。运行应用程序后,这些按钮

自动工作,意味着我们可以进入下一步,上一步按

点击相应的按钮。在我的应用程序中,我有3个步骤。在

单击下一步按钮,我想要做两件事。一个是

在DB中插入第1步的数据---它正在工作。

其次我想点击下一步按钮进入下一步----哪个

应该自动发生---但它不会进入第2步,它只会在步骤1中停留

。我希望你能理解我的问题。请帮助我

解决这个小问题...


问候

Raghav Mahajan


嗨Raghav,

i将相同的事件添加到我的简化示例中,它仍然可以正常工作。


你可以为向导发布你的ASPX标记,以防万一..


我的ASPX看起来像这样:


< asp:向导ID =" Wizard1" runat =" server"

OnNextButtonClick =" Wizard1_NextButtonClick">

< WizardSteps>

< asp:WizardStep runat =" ;服务器" Title =" Step 1">

你好,

< / asp:WizardStep>

< asp:WizardStep runat =" ;服务器" Title =" Step 2">

有一个,

< / asp:WzardStep>

< asp:WizardStep runat = "服务器" Title =" Step 3">

美好的一天

< / asp:WizardStep>

< / WizardSteps>

< / asp:向导>


后面的代码执行此操作:

protected void Wizard1_NextButtonClick(object sender,

WizardNavigationEventArgs e)

{

this.Wizard1.HeaderText = String.Format(" {0}的下一步事件,

DateTime.Now.ToLongTimeString());

}


你的page_load中有什么好玩的吗?


谢谢

tim


" raghav" < ma ******** @ gmail.comwrote in message

news:11 ********************** @ i42g2000cwa.googlegr oups.com ...


嗨Tim


感谢您主动解决我的问题。我的代码在下一个

按钮点击如下:-----


protected void Wizard1_NextButtonClick(对象发送者,

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 = str ing.Empty;

string Pinp = string.Empty;

string Phonep = string.Empty;

string Hobbies = string.Empty; < br $>
string Interests = string.Empty;

string Achievements = string.Empty;

bool IsPermanentAddress = false;


FirstName = txtfname.Text.ToString();

MiddleName = txtmname.Text.ToString();

LastName = txtlname.Text.ToString();

性别= ddlgender.SelectedItem.Value;

Email = txtemail.Text.ToString();

Mobile = txtmobileno.Text.ToString( );

ResumePath = uploadresume.FileName;

地址= txtaddress.Text.ToString();

City = txtcity.Text.ToString( );

State = ddlstate.SelectedItem.Value;

Country = ddlcountry.SelectedItem.Value;

Pin = txtpin.Text.ToString( );

Phone = txt phoneno.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();

兴趣= txtinterests.Text.ToString();

成就= 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 =电子邮件;

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 =国家;

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 =

成就;

SqlDataSource3.InsertParameters [22] .DefaultValue

= IsPermanentAddress.ToString();

SqlDataSource3.Insert();

}

这是第一步的代码...... br />

问候

Raghav


Tim_Mac写道:


> hi raghav,
我理解你的帖子。你必须做些什么来打破
默认的行为。
发布你的代码,我们可能会看到可能出现的问题。

蒂姆

" raghav" < ma ******** @ gmail.comwrote in message
新闻:11 ********************** @ d34g2000cwd.googleg roups.com ...




我正在研究ASP.NET 2.0。我正在使用Wizard

控制开发一个网站。根据添加的步数,下一个,上一个,完成按钮

自动生成。运行应用程序后,这些按钮

自动工作,意味着我们可以进入下一步,上一步按

点击相应的按钮。在我的应用程序中,我有3个步骤。在

单击下一步按钮,我想要做两件事。一个是

在DB中插入第1步的数据---它正在工作。

其次我想点击下一步按钮进入下一步----哪个

应该自动发生---但它不会进入第2步,它只会在步骤1中停留

。我希望你能理解我的问题。请帮助我

解决这个小问题...


问候

Raghav Mahajan



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

解决方案

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
"raghav" <ma********@gmail.comwrote in message
news:11**********************@d34g2000cwd.googlegr oups.com...

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



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
"raghav" <ma********@gmail.comwrote in message
news:11**********************@d34g2000cwd.googlegr oups.com...

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


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" <ma********@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...

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
"raghav" <ma********@gmail.comwrote in message
news:11**********************@d34g2000cwd.googleg roups.com...

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



这篇关于向导控制问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆