在向导中访问StartNavigationTemplate中的控件

时间:2022-03-05 15:10:11

wizard.FindControl does not find the control.

wizard.FindControl找不到控件。

How do I access it so, for example, I can change the text on a button? I'm using a 3rd party source for the button text so cannot use Globalization.

我如何访问它,例如,我可以更改按钮上的文本?我正在使用按钮文本的第三方源,因此无法使用全球化。

2 个解决方案

#1


6  

Or you could try something like this :

或者您可以尝试这样的事情:

Button btnNext = (Button)MyWizard.FindControl("StartNavigationTemplateContainerID$StartNextButton");

Button btnNext =(Button)MyWizard.FindControl(“StartNavigationTemplateContainerID $ StartNextButton”);

#2


0  

it is hard to find the controls directly using find control. But what you can do is create your own Template for the navigation templates (you will need to inherit from iTemplate). There are 3 of these startNavigationTemplate,StepNavigationTemplate and finish navigation template. Start template will display for the wizard steps which have stepType set as Start etc. Worth noting that you can set the template for all of the templates etc.

很难直接使用find控件找到控件。但是你可以做的是为导航模板创建自己的模板(你需要从iTemplate继承)。这些startNavigationTemplate,StepNavigationTemplate和完成导航模板中有3个。启动模板将显示向导步骤,其中stepType设置为Start等。值得注意的是,您可以为所有模板等设置模板。

good article on wizard control is http://msdn.microsoft.com/en-us/magazine/cc163894.aspx

关于向导控制的好文章是http://msdn.microsoft.com/en-us/magazine/cc163894.aspx

#1


6  

Or you could try something like this :

或者您可以尝试这样的事情:

Button btnNext = (Button)MyWizard.FindControl("StartNavigationTemplateContainerID$StartNextButton");

Button btnNext =(Button)MyWizard.FindControl(“StartNavigationTemplateContainerID $ StartNextButton”);

#2


0  

it is hard to find the controls directly using find control. But what you can do is create your own Template for the navigation templates (you will need to inherit from iTemplate). There are 3 of these startNavigationTemplate,StepNavigationTemplate and finish navigation template. Start template will display for the wizard steps which have stepType set as Start etc. Worth noting that you can set the template for all of the templates etc.

很难直接使用find控件找到控件。但是你可以做的是为导航模板创建自己的模板(你需要从iTemplate继承)。这些startNavigationTemplate,StepNavigationTemplate和完成导航模板中有3个。启动模板将显示向导步骤,其中stepType设置为Start等。值得注意的是,您可以为所有模板等设置模板。

good article on wizard control is http://msdn.microsoft.com/en-us/magazine/cc163894.aspx

关于向导控制的好文章是http://msdn.microsoft.com/en-us/magazine/cc163894.aspx