Tech Off Post

Single Post Permalink

View Thread: Simple Question ASP.NET mvc3 (Razor)
  • Cybermagell​an

    Well, I took the better option of removing the spaces (Apparently I have more control over the data then I previously had thought). However I'm having an issue trying to parameterize the data...

    @CODE
          Dim qfilter = Request.Form("qfilter").ToString
          Dim q = Request.Form("q").ToString
          Dim db = Database.Open("myConnectionString")
          Dim selectQuery = "SELECT * FROM table_name WHERE @0 = @1"
          For Each row in db.Query(selectQuery,qfilter,q)
              'Code to show results
          Next
    END CODE

    However I'm not getting any results back....when I output the variables I'm getting the @0 and @1 the way they should be (Payroll and 7748 respectively), however inside the page nothing else is happening.

    Ideas?