none
Query String in EW4 RRS feed

  • Question

  • I am having trouble with a query string.  I am new to this but am continuing to learn. I have posted a video to show who ever can help what I have done.  I thought it might be easier for someone to help if they could see what I have done so far.  The query string I have so far is:

    SELECT [month], [year], [listtakengoal], [listtakenactual], [listvolumegoal], [listvolumeactual], [closedsidesgoal], [closedsidesactual], [closedvolumegoal], [closedvolumeactual], [gciproduced], [nciproduced], [commlvldollars] FROM [AgentProduction] WHERE ([mlsaccesscode] = ?) ORDER BY [year] DESC, [month]

    I have another field "password" on the search.aspx page and I want both "mlsaccesscode" and "password" to be true.

    Here is the link: http://www.trackourteam.com/search.wmv

     


    Thank you! Bruce Dill
    Friday, January 21, 2011 2:39 PM

Answers

  • The easiest way to do this with minimal hand-writing of your Select and parameters is to put both asp.net text boxes on the page *before* configuring your datasource, so that you can use the database configuration wizard's "Where" button to add both conditions: pick a column, then "=", then control, select one of the texboxes, and add the condition.  Repeat for the other condition..  They will, by default, be "AND"'d.

    Just reconfigure your datasource and try it.  (Since you didn't post the code that actually sends this information to the next page, I'm not sure what you'll need to modify.)

    • Marked as answer by Bruce Dill Friday, January 21, 2011 6:36 PM
    Friday, January 21, 2011 5:13 PM

All replies


  • Well first thing is personally, I dont like a site that loads a media player when you go there.

    Now if you wanted some very basic security like you described where visitors have to fill in a couple of text boxes with the correct information, what you could do is put the content you want secured into a panel control on the page

    Then when the page loads you make the the panel not visible and the textboxes visible along with instructions to fill in the text boxes and click a continue button

    Then when the continue button is clicked, you have code-behind that when the button is clicked, will make that panel visible it the textboxes have the proper text in them so that visitor can do the searches.

    To do these things simply, you need Visual Web Developer Express which will set up the code behind pages, and will write the boilerplate code for the page load event and the button click event.

    Then in the page load subroutine you would have something (in VB) like:

    mypanel.visible = false

    An in the button click subroutine you would have something like:

    If textbox1.text = "your required text here" and textbox2.text = "reqiured text here" then mypanelvisible = true

    You could also make the textboxes and button not visible at the same time you make mypanel visible.



    ClarkNK, A.K.A. HomePage Doctor
    HomePageDoctor.com -- Expression Web database tutorials
    Ownertrades.com -- Created with FP, Access, Bots and Wizards
    LawOfAllTheLand.org -- Created with Expression, VWDExress, SQL Express, and ASP.NET.
    Arvixe -- My favored web host
    Friday, January 21, 2011 4:55 PM
  • The easiest way to do this with minimal hand-writing of your Select and parameters is to put both asp.net text boxes on the page *before* configuring your datasource, so that you can use the database configuration wizard's "Where" button to add both conditions: pick a column, then "=", then control, select one of the texboxes, and add the condition.  Repeat for the other condition..  They will, by default, be "AND"'d.

    Just reconfigure your datasource and try it.  (Since you didn't post the code that actually sends this information to the next page, I'm not sure what you'll need to modify.)

    • Marked as answer by Bruce Dill Friday, January 21, 2011 6:36 PM
    Friday, January 21, 2011 5:13 PM
  • Thank you both for your help!  As usual it is usually the end user who is doing something wrong and not the program. I had already tried this but it didn't work so I assumed the program was wrong when it wasn't. The mlsaccesscode is a 12 charachter case sensitive field.  I was not entering the code correctly.

    Duh!

    Thanks for the help.  The code works perfectly.  I will be back with another problem this afternoon.


    Thank you! Bruce Dill
    Friday, January 21, 2011 6:36 PM