can i use "" in my address textbox?

Posted by Rajupatil under ASP.NET AJAX on 10/25/2012 | Points: 10 | Views : 840 | Status : [Member] | Replies : 6
Hi, how can i use " " in my Textbox please help me i hv no idea.




Responses

Posted by: Santhi on: 10/25/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

Can you explain your question clear?

Regards,
V. Santhi

Thanks & Regards,
Santhi .V

Rajupatil, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naraayanan on: 10/25/2012 [Member] Starter | Points: 25

Up
0
Down
HI,
Please explain your Question....
I think, You want like this in the Text Box at Run time.
10,"P.H" Road,



Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Rajupatil, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajupatil on: 11/1/2012 [Member] Starter | Points: 25

Up
0
Down
yes i want same bt i ha error on thse plz give an idea..........

Rajupatil, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naraayanan on: 11/1/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
Could you paste your code ?. we will try.

Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Rajupatil, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajupatil on: 11/1/2012 [Member] Starter | Points: 25

Up
0
Down
when i m use singal qote like e.g. 'ramvihar' then error occure Incorrect syntax near 'ramvihar'. tere is no problem of duoble qote...............plz give any idea about hw single qote use...... following query i use to insert record in database.

con.Open();
SqlCommand cmd = new SqlCommand("insert into clientinfo values('" + txtcname.Text + "','" + txtaddress.Text + "','" + txtcperson.Text + "','" + txtmob.Text + "','" + txtcmpyno.Text + "','" + txtdomain.Text + "','"+datet+"','" + datet2 + "','" + datet3 + "','" + datet4 + "','" + txtmaint.Text + "','" + txtmdetails.Text + "','" + txtnote.Text + "','" + DateTime.Now.ToShortDateString() + "','" + datet5 + "','" + datet6 + "','" + datet7 + "')", con);
cmd.CommandType = CommandType.Text;
cmd.ExecuteNonQuery();
con.Close();
lblmesg.Text = "Record Save successfully.......";




Rajupatil, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sourabh07 on: 11/1/2012 [Member] Starter | Points: 25

Up
0
Down
hi..

try to pass these values in parameters.......like @address, @name, @mobile, @domain etc.

If again, error will occur.. then use stored procedure for this.

I think, it will be resolved after passing these textbox values in parameters.

Eg:

SqlCommand cmd = new SqlCommand("insert into clientinfo values(@mobile,@domain)");        cmd.Parameters.AddWithValue("@mobile", txtMobile.Text);


Sourabh07

Rajupatil, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response