473,395 Members | 1,502 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

c# asp.net controls single quote and dashes

karenRoss
I have a search form on a .aspx page. On the same page I have a ASP SQL Data Source control and a repeater control. The only code behind is there to show and hide certain objects on the page. The page is PostBack for results.

When people enter a single quote( ' ) or a dash( - ) into the search form it explodes (figuratively). I tried putting on "On_Click" code behind, however, since the ASP.Net SQL Data control seems to bypass my code behind page and gather data from the search form controls anyway. I do not want to change the stored procedure because I'm not sure who/what all uses it.

How can I handle ( ' ) and ( - ) in my search form? Any ideas?
Jun 5 '07 #1
2 1322
giveDsolution
107 100+
I have a search form on a .aspx page. On the same page I have a ASP SQL Data Source control and a repeater control. The only code behind is there to show and hide certain objects on the page. The page is PostBack for results.

When people enter a single quote( ' ) or a dash( - ) into the search form it explodes (figuratively). I tried putting on "On_Click" code behind, however, since the ASP.Net SQL Data control seems to bypass my code behind page and gather data from the search form controls anyway. I do not want to change the stored procedure because I'm not sure who/what all uses it.

How can I handle ( ' ) and ( - ) in my search form? Any ideas?

Give the javascript validation for ( ' ) and ( - ) in ur page
Jun 6 '07 #2
Give the javascript validation for ( ' ) and ( - ) in ur page
I should probably post a new better version of this question.
Jun 6 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Little PussyCat | last post by:
Hello, I have had a request, one of our tables is used as a report and I have been asked that all fieldnames for months have dashes in them, like Jan-05 instead of Jan05 and so on... Now what...
3
by: encoad | last post by:
Hi everybody, I'm hoping you can help me understand why this doesn't work, and perhaps someone can suggest a way for me to solve my problem. Essentially, I'm trying to add a row with a single cell...
10
by: Neil | last post by:
Using the MS Rich Textbox Control 6.0 in Access 2000, I need to concatenate several RTB controls into a single RTF file. Sometimes two strings will be side-by-side; other times they need to be...
2
by: DotNetNewbie | last post by:
Hi, I want to replace all consecutive (2 or more) dashes into a single dash. So text like "hello--world is-cool------ok?" should become "hello-word is-cool-ok?" so it doesn't effect...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.