Author: mahichandu | Posted on: 7/2/2009 10:10:11 AM | Views : 267

Hi  I have stored Procedure for populating listofdays(i,e date) by year ,Month.My spro will filter all the leap year and listofdays by month.Hear i am adding two parameters  Year,Month. i can't  see data populating into the datatable.
QQ)I am adding my parametrs correct only right? QQ)How to add this data to my dropdownlist.??see code below. See below My code.
public DataTable GetListofdays(Int16 iyear, Int16 imonth)
 {
cmd = new SqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
 cmd.CommandText = "dbo.ndi_sp_GetDaysOfMonth";
cmd.Parameters.Add(new SqlParameter("@Month", DbType.Int16));
 cmd.Parameters.Add(new SqlParameter("@Year", DbType.Int16));
cmd.Parameters["@Month"].Value = iyear;
cmd.Parameters["@Year"].Value = imonth; return GetDataTable(cmd);
 }

Go to the complete details ...