Re: declaration expected

From: Simon Harris (too-much-spam_at_makes-you-fat.com)
Date: 10/03/04


Date: Sun, 3 Oct 2004 22:03:54 +0100

Thank you! Now working, and in the code behind as it 'should be'

"Hermit Dave" <hermitd.REMOVE@CAPS.AND.DOTS.hotmail.com> wrote in message
news:unHIRgXqEHA.376@TK2MSFTNGP14.phx.gbl...
>i prefer to directly use
> Requst("variablename") to grab the variable.
>
> if you double click the page it should open the codebehind class file on
> Page_Load event handler.
>
> here declare something like
>
> dim ResortID as integer
>
> if Request("resortid") <> "" then
> ResortID = cint(Request("resortid"))
> end if
>
> i dont use VB.NET so dont know if you have cint any more.
> In C# we tend to use int.parse(string) to get int convesion. you can also
> use Convert.ToInt32(variable) to get a int
>
> --
>
> Regards,
>
> Hermit Dave
> (http://hdave.blogspot.com)
> "Simon Harris" <too-much-spam@makes-you-fat.com> wrote in message
> news:e1emT9WqEHA.1296@TK2MSFTNGP12.phx.gbl...
>> Hi All,
>>
>> I have a page which I want to accept an ID on the querystring - I'm
>> trying
>> to get this ID into a hidden form field.
>>
>> I have the following code at the top of my page:
>>
>> Line 5: <script language="VB" runat="server">
>> Line 6: dim ResortID as integer
>> Line 7: ResortID = Request.QueryString("resortid")
>> Line 8: </script>
>>
>> I get this error:
>>
>> Compiler Error Message: BC30188: Declaration expected.
>>
>> What have I done wrong?
>>
>> I hear alot of talk about using code behind page for everything, but how
>> would I grab querystring vars using code behind?
>>
>> Regards,
>> Simon.
>>
>>
>
>



Relevant Pages

  • Re: mirror question
    ... but eddie is just a newbie who only posted 3 times, ... so as usual on this forum if you dont understand the OP, compensate your ignorance by insulting the OP. ...
    (sci.math)
  • Re: Genes and the Mind
    ... I really dont know what you mean by "swaying" someone with a study. ... Could you provide the reference for "the article in question"? ...
    (uk.philosophy.humanism)
  • Re: Internet Signup
    ... I know I could just use notepad but I dont want all ... > Regards, Jerry ... >> I test many systems per week using a dialup account on OEM systems. ...
    (microsoft.public.internet.explorer.ieak)
  • Re: One User Name in multiple domains.
    ... You cannot and you dont have to create two info users, ... Regards, ... >> If you want to separate mail access you have to create separate AD ...
    (microsoft.public.exchange.setup)