Avatar of dana Rooki2020
dana Rooki2020
 asked on

.Net error with Searching if special sign ‘ is used in search

Like to make it possible that you can search O´Neill on our homepage and MS-SQL error the search/page.
What do we need to add to our Searchfield to allow this ? Here our search page today:

  <%
            if request("ArticleNo")<>"" then
                ArticleNo = request("ArticleNo")
            else
                ArticleNo = "Artikel Nr."
            end if
            if request("search")<>"" then
                search = request("search")
                if IsNumeric(search) then
                    ArticleNo = search
                    search = "Freitextsuche"
                end if


  <script language="javascript" type="text/javascript">
                $(function () {
                    function initPage() {
                        $('#search').attr('value', '<% = search %>');
                        doSearch();
</script>

<td>
                                <input id="search" name="search" type="text" size="20" class="search2 rounded" onBlur="if(this.value=='')this.value='Freitextsuche';" onFocus="this.value='';" value="" />
                            </td>
.NET Programming

Avatar of undefined
Last Comment
gr8gonzo

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
gr8gonzo

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23