Click here to Skip to main content
15,868,016 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionReturnURL encoding in Forms Authentication. Pin
Ashwani_kumar26-Nov-07 0:05
Ashwani_kumar26-Nov-07 0:05 
AnswerRe: ReturnURL encoding in Forms Authentication. Pin
Venkatesh Mookkan26-Nov-07 0:36
Venkatesh Mookkan26-Nov-07 0:36 
QuestionTreeView 's node Click Event Pin
Rocky#25-Nov-07 23:29
Rocky#25-Nov-07 23:29 
AnswerRe: TreeView 's node Click Event Pin
jagadeeshkumar198425-Nov-07 23:33
jagadeeshkumar198425-Nov-07 23:33 
GeneralRe: TreeView 's node Click Event Pin
Rocky#25-Nov-07 23:37
Rocky#25-Nov-07 23:37 
GeneralRe: TreeView 's node Click Event Pin
jagadeeshkumar198425-Nov-07 23:39
jagadeeshkumar198425-Nov-07 23:39 
GeneralRe: TreeView 's node Click Event Pin
Rocky#25-Nov-07 23:41
Rocky#25-Nov-07 23:41 
GeneralRe: TreeView 's node Click Event Pin
Rocky#26-Nov-07 0:00
Rocky#26-Nov-07 0:00 
Unable to cast object of type 'System.Web.UI.WebControls.TreeView' to type 'System.Web.UI.WebControls.TreeNode'

Thats the error I'm getting, here's my code

protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
{
TreeNode node = (TreeNode)sender;

int id = Convert.ToInt32(node.Value);
Categories objCat = new Categories();
objCat.Where.ID.Value = id;
if (objCat.Query.Load())
{
TextBox tb = FormView1.FindControl("CatNameTextBox") as TextBox;
tb.Text = objCat.CatName;
tb = FormView1.FindControl("DescriptionTextBox") as TextBox;
tb.Text = objCat.Description;
CheckBox ck = FormView1.FindControl("IsActiveChkBox") as CheckBox;
ck.Checked = objCat.IsActive;

}


}

what I wanna do is to take the TreeNode Object coz its text and value are the CategoryName and ID respectively. But its unable to cast it to treeNode. Now what??!!

Rocky

You can't climb up a ladder with your hands in your pockets.

GeneralRe: TreeView 's node Click Event Pin
Sherin Iranimose26-Nov-07 0:08
Sherin Iranimose26-Nov-07 0:08 
GeneralRe: TreeView 's node Click Event Pin
Rocky#26-Nov-07 0:23
Rocky#26-Nov-07 0:23 
GeneralRe: TreeView 's node Click Event Pin
Venkatesh Mookkan26-Nov-07 0:41
Venkatesh Mookkan26-Nov-07 0:41 
GeneralRe: TreeView 's node Click Event Pin
Rocky#26-Nov-07 0:45
Rocky#26-Nov-07 0:45 
GeneralRe: TreeView 's node Click Event Pin
Sherin Iranimose26-Nov-07 0:45
Sherin Iranimose26-Nov-07 0:45 
GeneralRe: TreeView 's node Click Event Pin
Rocky#26-Nov-07 0:47
Rocky#26-Nov-07 0:47 
Questionhow i can load zero bytes files using file upload control Pin
jagadeeshkumar198425-Nov-07 23:23
jagadeeshkumar198425-Nov-07 23:23 
AnswerRe: how i can load zero bytes files using file upload control Pin
NanaAM26-Nov-07 0:21
NanaAM26-Nov-07 0:21 
GeneralRe: how i can load zero bytes files using file upload control Pin
NanaAM26-Nov-07 0:21
NanaAM26-Nov-07 0:21 
GeneralRe: how i can load zero bytes files using file upload control Pin
jagadeeshkumar198426-Nov-07 0:36
jagadeeshkumar198426-Nov-07 0:36 
GeneralRe: how i can load zero bytes files using file upload control Pin
Venkatesh Mookkan26-Nov-07 0:53
Venkatesh Mookkan26-Nov-07 0:53 
QuestionTreeView Control Pin
Mazdak25-Nov-07 23:22
Mazdak25-Nov-07 23:22 
AnswerRe: TreeView Control Pin
Venkatesh Mookkan26-Nov-07 0:55
Venkatesh Mookkan26-Nov-07 0:55 
Question[Message Deleted] Pin
SreejithAchutan25-Nov-07 23:07
SreejithAchutan25-Nov-07 23:07 
AnswerRe: Checkboxfield property Pin
_AK_25-Nov-07 23:11
_AK_25-Nov-07 23:11 
AnswerRe: Checkboxfield property Pin
Sun Rays25-Nov-07 23:13
Sun Rays25-Nov-07 23:13 
GeneralRe: Checkboxfield property Pin
SreejithAchutan25-Nov-07 23:17
SreejithAchutan25-Nov-07 23:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.