Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Bastet Massri   on Oct 27 In Asp.net Category.

  
Question Answered By: Troy Kelley   on Oct 27

You need to convert to the correct type

in C# it's

Lbl_Biller.Text = (string)Session("UserCode") ... ( equiv in VB is CType I think)... but that sometimes fails saying "invalid Cast"

Lbl_Biller.Text = Session("UserCode").ToString() ..... usually works

Lbl_Biller.Text = Convert.ToString(Session("UserCode")) has never failed as far as I can remember

Share: 

 
 
Didn't find what you were looking for? Find more on Session Vars Or get search suggestion and latest updates.


Tagged: