cast and extract

Results 1 to 2 of 2

Thread: cast and extract

  1. #1
    Join Date
    Dec 1969

    Default cast and extract

    I&#039;m trying to do the following and i get an invalid cast error.<BR>Any ideas how to get around this or maybe an alternate way of gettting the value alltogether?<BR><BR>int user_id = Int32.Parse(((System.Data.Common.DbDataRecord)e.It em.DataItem)["user_id"].ToString());<BR> <BR>e is RepeaterItemEventArgs (comes from onitemdatabound handler) and i know that the above code works<BR>for DataGridItemEventArgs why won&#039;t it work here?<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: cast and extract

    I would try response.writing out you variable with some characters around it so you can see if your ever getting NULL returned.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts