A bit of ASP help, if you will...
Results 1 to 6 of 6

Thread: A bit of ASP help, if you will...

  1. #1
    Senior Member
    Join Date
    Jun 2002
    Posts
    174

    A bit of ASP help, if you will...

    I'm porting an application from PHP to ASP.NET. The programmer who made the PHP version used a bunch of includes with parameter passing instead of using OO.

    (Example: $someVar = 1; include('blah.php'); //which would process based on the value of $someVar )

    I'm trying to convert these over to User Controls, but I'm a bit shady on the parameter passing, as I'm new to ASP.

    Does anyone know how I can pass my User Control a parameter during instantiation from the aspx page?

    (Ex: <UserControl:QueryBox ID="blah" value="foobar" runat="server" /> //where "foobar" is the parameter being passed. )

    Please and thanks, amigos.
    I\'m back.

  2. #2
    Senior Member
    Join Date
    Jun 2002
    Posts
    174
    Hey! Check it out! Trial and error! Got it.

    Thanks... everyone. (Seems these web-dev ones never get looked at.)
    I\'m back.

  3. #3
    Just Another Geek
    Join Date
    Jul 2002
    Location
    Rotterdam, Netherlands
    Posts
    3,403
    Originally posted here by embro1001
    (Seems these web-dev ones never get looked at.)
    No, they're looked at alright.. But usually it does take a bit longer then 20 min...

    I'm porting an application from PHP to ASP.NET.
    Why?

    The programmer who made the PHP version used a bunch of includes with parameter passing instead of using OO.

    (Example: $someVar = 1; include('blah.php'); //which would process based on the value of $someVar )
    Parameter passing with includes? No, not really..
    $someVar is just a (global?) variable.. The includes will include (surprise, surprise) the code as is into the script calling the include. You could just as well copy 'n past the included file into the original script it would still work the same.
    Oliver's Law:
    Experience is something you don't get until just after you need it.

  4. #4
    Ninja Code Monkey
    Join Date
    Nov 2001
    Location
    Washington State
    Posts
    1,027
    Because ASP.net owns PHP up and down.

    Are you sure you really need to do things the way the php developer did them? What are you actually trying to accomplish with the on and off includes?
    "When I get a little money I buy books; and if any is left I buy food and clothes." - Erasmus
    "There is no programming language, no matter how structured, that will prevent programmers from writing bad programs." - L. Flon
    "Mischief my ass, you are an unethical moron." - chsh
    Blog of X

  5. #5
    Senior Member
    Join Date
    Nov 2001
    Posts
    1,255
    Really, porting *between languages* = bad. You're better off analyzing what the app does and developing your own from scratch. It adds a bit of time to the project, yes, but it does allow you to do things properly in the language you're using.

    Procedural PHP = bleh as far as I'm concerned.
    Chris Shepherd
    The Nelson-Shepherd cutoff: The point at which you realise someone is an idiot while trying to help them.
    \"Well as far as the spelling, I speak fluently both your native languages. Do you even can try spell mine ?\" -- Failed Insult
    Is your whole family retarded, or did they just catch it from you?

  6. #6
    Senior Member
    Join Date
    Jun 2002
    Posts
    174
    Thanks all.

    The reason I'm porting it over is because the "site" is actually an application that the company's trying to sell, and they want multiple versions...

    ... or at least they did...

    It looks like my worries are over; they decided to keep it hosted locally and have companies link over. It keeps the boss happy and the code ours.

    BTW - I've been developing another site in ASP.NET, and as much as I hate to say it, I don't dislike it as much as I thought I would. It's a little different than coding in PHP; I have to keep wrapping my head around the fact that I have some semblance of a solid-state app...

    Cheers all,
    Mase
    I\'m back.

Posting Permissions

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

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides