View Single Post
  #3 (permalink)  
Old June 12th, 2009, 03:21 PM
eddiemcham eddiemcham is offline
Authorized User
Points: 112, Level: 2
Points: 112, Level: 2 Points: 112, Level: 2 Points: 112, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2008
Location: San Antonio, TX, USA.
Posts: 26
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Thank you for confirming what I already suspected. For some reason, none of the QuestionTemplate samples or tutorials covered that part. All they showed were two literals with IDs "UserName" and "Question."

So I've managed to scrape up some C# code and gotten the UserName to finally show up. I'm still having quite a time pulling up the PasswordRecovery.Question.

Here is the C# code I've got so far:

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
public partial class_Default : System.Web.UI.Page

{ 
protected void Page_Load(object sender, EventArgs e)
{
TextBox userID = (TextBox)PasswordRecovery1.UserNameTemplateContainer.FindControl("UserName");
userID.Focus();
Literal qUserName = (Literal)PasswordRecovery1.QuestionTemplateContainer.FindControl("UserName");
qUserName.Text = userID.Text;
Literal secretQuestion = (Literal)PasswordRecovery1.QuestionTemplateContainer.FindControl("Question");
secretQuestion.Text = PasswordRecovery1.Question;
}
}
Again, I apologize for such a newbie question and appreciate any additional tips.

~e
__________________
~ Eddie McHam
Reply With Quote