Proble using CustoControl

Results 1 to 2 of 2

Thread: Proble using CustoControl

  1. #1
    Join Date
    Dec 1969

    Default Proble using CustoControl

    I have decleared a public integer in my control (intID).<BR>If I write: intID="2" in my .aspx page (as a parameter to my control). Everything works fine. But when I try to write something like: intID="&#060;%=intValue%&#062;" I get an string/Int32 conversion error. Can anyone help me on this one? Hpw can I do this?

  2. #2
    Join Date
    Dec 1969

    Default RE: Proble using CustoControl

    I assume that intID is a string and intValue is an integer. In that case you can solve the problem by changing intID to an integer or convert intValue to a string by using the method ToString().<BR><BR>i.e <BR>&#060;%=intValue.ToString()%&#062;<BR><BR>ps<B R>if you somehow want to convert something to an integer you have to use the command Convert.ToInt32(intValue). But I suppose you don&#039;t need that for this case.<BR>ds

Posting Permissions

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