Hi,
I have a code, where I want to get the CategoryId of the selected value. The rest of the columns are been coming from an excel sheet. Just want to get the CategoryId of the selectedvalue from the dropdown. Please see the code which I tried, but I am not
getting the CategoryId.
private void ImporttoSQL(string sPath)
{
string sSourceConstr1 = string.Format(@"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\AgentList.xls; Extended Properties=""Excel 8.0;HDR=YES;""", sPath);
string sSourceConstr = string.Format(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=""Excel 12.0 Xml;HDR=YES;""", sPath);
OleDbConnection sSourceConnection = new OleDbConnection(sSourceConstr);
using (sSourceConnection)
{
SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings[&quo ...
Go to the complete details ...