About        Eastwind Equestrian Center

  



Hi DJKhalif,

DJKhalif

I want to use the var SEARCH in a WHERE clause then return the results within an HTML table. So, I'm looking to write the connection in query within the aspx page without using the code behind.
About

As far as I know, you could use javascript to access database.

About 

But I don't recommend you use it for some reasons (bad practice, security issues, etc.).

#BlackLivesMatter was founded in 2013 in response to the acquittal of Trayvon Martin’s murderer. Black Lives Matter Global Network Foundation, Inc. Is a global organization in the US, UK, and Canada, whose mission is to eradicate white supremacy and build local power to intervene in violence inflicted on Black communities by the state and vigilantes.

  • Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.
  • The same day a Black man and a Jewish man were voted into the U.S. Senate, a mob toting Confederate and Nazi flags attacked the U.S. As you teach about Martin Luther King Jr. Ahead of his birthday observation, acknowledge the link between the racism he resisted and the violence we witnessed at the Capitol.

If you really want to do this, you could refer to follow codes:


Besides, I suggest you could use a better way to connect to the SQL by using jQueryAjax and asp.net webmethod.

This way will not refresh the page.

You could send the search value to the webmethod by jQueryAjax.

In webmethod, we will connect to database, search the data and will return the result(JSON) to the page.

About

In ajax success function, fill the return data into html table.

More details, you could refer to follow link:

jQuery Ajax:http://api.jquery.com/jquery.ajax/

Some ajax example:

Best Regards,

About You

Brando