stored procedures - Pass a date from datepicker to sql server database -


i have datepicker textbox below:

   <input type="text" id="txtdob" class="datepicker" style="width:154px"/> 

i not able pass value datepicker database table.everything works fine not going post entire code here.i passing value below:

  cmd.parameters.addwithvalue("@dob", txtdob.value); 

but says not find txtdob.any appreciated.

try this

cmd.parameters.add(new sqlparameter("@dob",data.sqldbtype.datetime)) cmd.parameters("@dob").value = txtdob.value; 

Comments

Popular posts from this blog

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -

How to run C# code using mono without Xamarin in Android? -