trouble using FindControl on TemplatedWizardStep

A

Anton

asp.net 3.5

From within the Page_Load event of my webpage I'm trying to access the
hidden input below, I do it because i want to programmatically set the
PayPal url (the url is different on development box and on testing box, and
indeed different in production environment, so hope I could specify the URL
in web.config etc)....

I've tryed these without any luck (hidden is null)
HtmlInputHidden hidden =
(HtmlInputHidden)TempStep.ContentTemplateContainer..FindControl("return");
HtmlInputHidden hidden =
(HtmlInputHidden)cuwNewUser.WizardSteps[1].Controls[0].FindControl("return");

<asp:TemplatedWizardStep runat="server" ID="TempStep">
<CustomNavigationTemplate>
<div style="text-align:center; margin-bottom:50px;
margin-top:50px;">
<input type="hidden" runat="server" id="return"
name="return" value="PayPal URL" />

any ideas?
 
A

Anton

nevermind, I guess I cannot set the link from within the code. Because if
runat=server, then asp.net changes name of the control from "return" to
something totally different. The control need to be named "return" if it
shall have any chance of working with paypal
 

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

Top