Results 1 to 12 of 12

Thread: could anyone change this asp to asp.net

  1. #1

    Thread Starter
    Fanatic Member d2005's Avatar
    Join Date
    Aug 2005
    Location
    ireland
    Posts
    620

    could anyone change this asp to asp.net

    Code:
    ' Set up HTTP response header: no caching and immediate expiration
    	Response.CacheControl	= "no-cache"
    	Response.AddHeader "Pragma", "no-cache"
    	Response.Expires		= -1
    anyone
    it works 60% of the time, all the time.

  2. #2
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131

    Re: could anyone change this asp to asp.net

    In the Page_Load event:
    Code:
    Response.CacheControl = "no-cache";
    Response.Expires = -1;
    Response.AddHeader("Pragma", "no-cache");
    DJ

    If I have been helpful please rate my post. If I haven't tell me!

  3. #3

    Thread Starter
    Fanatic Member d2005's Avatar
    Join Date
    Aug 2005
    Location
    ireland
    Posts
    620

    Re: could anyone change this asp to asp.net

    thanks dj i got that one heres my next one,

    Compiler Error Message: BC30452: Operator '&' is not defined for types 'String' and 'System.Collections.Specialized.NameValueCollection'.

    Code:
    Line 22: 		bstrURI = "https://" & Request.ServerVariables("SERVER_NAME") & "/premium/smsmt.asp?" & Request.Form
    Line 23:
    it works 60% of the time, all the time.

  4. #4
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131

    Re: could anyone change this asp to asp.net

    You can't just concatenate Request.Form on the end - it isn't a string. You'll have to loop through all the members of it and add each one to the URL.

    DJ

    If I have been helpful please rate my post. If I haven't tell me!

  5. #5

    Thread Starter
    Fanatic Member d2005's Avatar
    Join Date
    Aug 2005
    Location
    ireland
    Posts
    620

    Re: could anyone change this asp to asp.net

    i dont understand

    remember i aint the sharpest tool in the shed

    Code:
    if "submit" = Request("mode") then
    		dim objSrvHTTP, bstrURI, vntStatus, bstrStatus
    		dim vntErrNumber, vntErrSource, vntErrDescription
    
    		bstrURI = "https://" & Request.ServerVariables("SERVER_NAME") & "/premium/smsmt.asp?" & Request.Form
    
    		on error resume next
    Last edited by d2005; Sep 16th, 2005 at 11:31 AM.
    it works 60% of the time, all the time.

  6. #6

    Thread Starter
    Fanatic Member d2005's Avatar
    Join Date
    Aug 2005
    Location
    ireland
    Posts
    620

    Re: could anyone change this asp to asp.net

    i have on the html page now ( the one im trying to convert)

    in the <body> form
    there are plenty of these <% %> as far as i know these are not acceptable,
    is there a rules i need to adhere to, in order to delete them

    e.g.
    action="http://<%=Request.ServerVariables("SERVER_NAME")%>:<%=Request.ServerVariables("7760")%><%=Request.ServerVar iables("SCRIPT_NAME")%>">
    it works 60% of the time, all the time.

  7. #7

    Thread Starter
    Fanatic Member d2005's Avatar
    Join Date
    Aug 2005
    Location
    ireland
    Posts
    620

    Re: could anyone change this asp to asp.net

    i have on the html page now ( the one im trying to convert)

    in the <body> form
    there are plenty of these <% %> as far as i know these are not acceptable,
    is there a rules i need to adhere to, in order to delete them

    e.g.
    VB Code:
    1. action="http://<%=Request.ServerVariables("SERVER_NAME")%>:<%=Request.ServerVariables("7760")%><%=Request.ServerVariables("SCRIPT_NAME")%>">
    Last edited by d2005; Sep 19th, 2005 at 06:47 AM.
    it works 60% of the time, all the time.

  8. #8
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: could anyone change this asp to asp.net

    To stick to ASP.NET methods, you'd set the action attribute through the codebehind in the page load event. But since it appears that the page is submitting to itself, you'd remove that action attribute.

    May I suggest you rewrite the whole page, from scratch?

  9. #9

    Thread Starter
    Fanatic Member d2005's Avatar
    Join Date
    Aug 2005
    Location
    ireland
    Posts
    620

    Re: could anyone change this asp to asp.net

    yeah mendhak that is what i shall have to do
    can it be done in the code behind file
    instead of the html as this is how i would prefer to work
    it works 60% of the time, all the time.

  10. #10
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: could anyone change this asp to asp.net

    You'll have to separate your HTML and your codebehind. Are you very familiar with the concept of ASP.NET controls and code behind? Do you want a tutorial?

  11. #11

    Thread Starter
    Fanatic Member d2005's Avatar
    Join Date
    Aug 2005
    Location
    ireland
    Posts
    620

    Re: could anyone change this asp to asp.net

    yeah a tutorial would be fantastic
    i prefer to use the code behind files
    but i suppose a good tutorial will help me along the way
    it works 60% of the time, all the time.

  12. #12
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: could anyone change this asp to asp.net


Posting Permissions

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



Click Here to Expand Forum to Full Width