Dear friends, I have a linkbutton in gridview. When I click on that linkbutton, I need to get some data based on the row which I clicked and this data to be sent to a javascript function. Please help me how to achieve this. It's very urgent. Regards, Cheguri.
cheguri
Posts
-
How to Call javascript function by clicking on Gridview link button -
Display Dynamic TableDear friends, I want to display employee login details in a table in calendar format. what ever month the user selects, the table should be displayed same like the calendar. we need to keep the dayname and date in table th tag. Anyone can help me, please.. It's very very urgent. Regards, Dileep.
-
Urgent. Error in Fetching date field data from excel sheetThanks friends, I have got it in another way. select * from [sheet1$] where LoginDate=#21/04/10# It's working fine. Thanks everyone. Regards, Dileep.
-
Fetch data from Excel SheetThanks friends, I have got it in another way. select * from [sheet1$] where LoginDate=#21/04/10# It's working fine. Thanks everyone. Regards, Dileep.
-
Urgent. Error in Fetching date field data from excel sheetDear friend, I am trying to fetch data from excel sheet using ASP.NET with C#. I want to get data based on one date condition. All the rows in that date column are having date only. I don't know what's wrong. I have tried in many ways. I am getting the following error. [System.Data.OleDb.OleDbException] = {"Data type mismatch in criteria expression."} Since last day afternoon, I am struggling for this. I have written queries in all following possible ways. select * from [sheet1$] where [LoginDate]='21/04/10' select * from [sheet1$] where [LoginDate]='21/04/2010' select * from [sheet1$] where [LoginDate]='21-04-10' select * from [sheet1$] where [LoginDate]='21-04-2010' select * from [sheet1$] where [LoginDate]='21-Apr-10' select * from [sheet1$] where [LoginDate]='21-Apr-2010' select * from [sheet1$] where [LoginDate]='04/21/10' select * from [sheet1$] where [LoginDate]='04/21/2010' select * from [sheet1$] where [LoginDate]='04-21-10' select * from [sheet1$] where [LoginDate]='04-21-2010' select * from [sheet1$] where [LoginDate]='Apr-21-10' select * from [sheet1$] where [LoginDate]='Apr-21-2010' select * from [Sheet1$] where [LoginDate] = '"+DateTime.Parse("04-21-10").ToString()+"'" select * from [Sheet1$] where [LoginDate] = '"+DateTime.Parse("04-21-10")+"'" Still I am not getting. Can anyone, pls help me. It's very urgent. Regards, Dileep
-
Fetch data from Excel SheetDear friend, All the rows in that column are having date only. I don't know what's wrong. I have tried in many ways. I am getting the following error. [System.Data.OleDb.OleDbException] = {"Data type mismatch in criteria expression."} Since last day afternoon, I am struggling for this. I have written queries in all following possible ways. select * from [sheet1$] where LoginDate='21/04/10' select * from [sheet1$] where LoginDate='21/04/2010' select * from [sheet1$] where LoginDate='21-04-10' select * from [sheet1$] where LoginDate='21-04-2010' select * from [sheet1$] where LoginDate='21-Apr-10' select * from [sheet1$] where LoginDate='21-Apr-2010' select * from [sheet1$] where LoginDate='04/21/10' select * from [sheet1$] where LoginDate='04/21/2010' select * from [sheet1$] where LoginDate='04-21-10' select * from [sheet1$] where LoginDate='04-21-2010' select * from [sheet1$] where LoginDate='Apr-21-10' select * from [sheet1$] where LoginDate='Apr-21-2010' select * from [Sheet1$] where [LoginDate] = '"+DateTime.Parse("04-21-10").ToString()+"'" select * from [Sheet1$] where [LoginDate] = '"+DateTime.Parse("04-21-10")+"'" Still I am not getting. Can anyone, pls help me. It's very urgent. Regards, Dileep
-
Fetch data from Excel SheetDear Anurag, I am still getting this following error. [System.Data.OleDb.OleDbException] = {"Data type mismatch in criteria expression."} I have written the following code. filename = path + "SS_EmpLoginTimings.xls"; string s = "provider=Microsoft.Jet.OLEDB.4.0;" + @"data source=" + filename + ";Extended Properties=Excel 8.0;"; OleDbConnection con = new OleDbConnection(s); con.Open(); OleDbDataAdapter da = new OleDbDataAdapter("select * from [Sheet1$] where Date='04/21/2010'", con); DataSet ds = new DataSet(); da.Fill(ds); DataTable dt = ds.Tables[0]; BulkCopyData(dt, "SS_EmpLoginTimings"); public bool BulkCopyData(DataTable dt, string tblName) { SqlBulkCopy bulk = new SqlBulkCopy(conn); bulk.DestinationTableName = tblName; conn.Open(); bulk.WriteToServer(dt); conn.Close(); return true; } Please help me. It's very urgent. I need to finish this work by today evening. Pls pls pls... Regards, Dileep.
-
Fetch data from Excel SheetDear friends, I want to fetch data from Excel sheet sheet1 using ASP.NET with C# and store the data in SqlServer database table using BulkCopy method. I am able to fetch complete excelsheet data, but I want only some rows. I want sql statement to fetch the data. Excel sheet contains one Date column. I want to fetch data from only particular dated rows. I am writing the following query select * from [Sheet1$] where Date=21/04/10 It is giving me error datatype mismatch. Please, can anyone help me. It's very urgent. Pls.... Thanks, Dileep.
-
System.IO.IOException Please help meDear friends, I am trying to upload one excel file to sqlserver database by using fileupload control. I am initially uploading the file and saving in a temporary folder and from this temporary folder I am copying the data to SqlServer Table. After copying the data, I want to delete the file in Temporary Folder. I wrote File.Delete(filename) code, but it is throwing following exception [System.IO.IOException] = {"The process cannot access the file 'E:\\SourceSafe\\ESSP\\Finance\\FinancePL\\uploadedfiles\\samplePS.xls' because it is being used by another process."} It is not allowing to delete the file. Please, can anyone help me in this. It's very urgent. Please.... Thanks, Dileep.
-
Load Excel file into Database using FileUpload Control ErrorDear Tej, I have tried Provider=Microsoft.ACE.OLEDB.12.0;Data Source=filename.xlsx;Extended Properties=Excel 12.0; for .xlsx files. I am getting the following error. Please help me... ex = {"The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine."} Regards, Dileep
-
Load Excel file into Database using FileUpload Control ErrorDear friends, I am uploading Excel sheet data using FileUpload control and want to store the data into sql server 2005 database. Excel Sheet file name is same as Table name in Database and Column headings are same as columns in database table. In my machine, I don't have MS Office. I am using OpenOffice now. I am getting an error "The Microsoft Jet database engine could not find the object 'Sheet1$'. Make sure the object exists and that you spell its name and the path name correctly." . I have written the following complete code. Please help me. Its very urgent. Please please please. The code is using System; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Data.SqlClient; using System.Data.OleDb; public partial class _Default : System.Web.UI.Page { SqlConnection connection=new SqlConnection("data source=10.0.3.30;initial catalog=rambasedev;user id=sa;password=admin"); protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { { Boolean fileOK = false; String path = Server.MapPath("~/UploadedFiles/"); if (FileUpload1.HasFile) { String fileExtension = System.IO.Path.GetExtension(FileUpload1.FileName).ToLower(); String[] allowedExtensions = { ".xls", ".xlsx" }; for (int i = 0; i < allowedExtensions.Length; i++) { if (fileExtension == allowedExtensions[i]) { fileOK = true; } } } if (fileOK) { try { string xConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + Server.MapPath(FileUpload1.FileName) + ";" + "Extended Properties=Excel 8.0;"; using (OleDbConnection connection = new OleDbConnection(xConnStr)) { OleDbCommand command = new OleDbCommand("Select EMPNO,ENAME,BASIC FROM [Sheet1$]", connection); connection.Open(); // Create DbDataReader to Da
-
Please help me.......MIME Type for XLS fileDear Friends, I have written the following code to upload .xls file. I want to upload only .xls file. if (fuploadPaySlip.HasFile) { if (fuploadPaySlip.PostedFile.ContentType == "application/x-msexcel") { fuploadPaySlip.PostedFile.SaveAs(Server.MapPath(".") + "//uploadedfiles//" + fuploadPaySlip.FileName); lblErrorMsg.Text = "Uploaded Successfully"; } else lblErrorMsg.Text = "Not a valid File"; } else lblErrorMsg.Text = "No File is Selected"; but it is always saying "Not a valid file". I have even tried with other MIME Types like application/excel application/vnd.ms-excel application/x-excel Still I am getting error. Please anyone can help me. Its very urgent. Regards, Dileep.
-
How to upload Excel file to Database from ASP.NETDear friends, I want to upload an Excel file from ASP.NET web form to Sql Server Database. I have all employees salary in the excel file. I want to upload it to the database through ASP.NET web form. I am using ASP.NET 3.5 with C# and SQL Server 2005. Please, anyone can help me, How to upload excel file using the FileUpload control? I need it urgently. Please help me. Regards, Dileep.
-
How to Display Confirmation Dialog BoxDear friends, I am working on ASP.NET 3.5 with C# Web Application. I want to upload some data to Sql Server Database. I am fetching some existing data from sql server database and want to display user like already these many records available in database. Do u still want to upload? If user clicks on yes it should display some other controls to upload data. If No, some other action to be taken. Please tell me how to prompt the user to do the above task. Please help me. Thanks, Dileep.
-
How to Display Outlook E-mail BoxThanks dude. its working now.
-
How to Display Outlook E-mail BoxYes, I got the solution. Thanks a lot.
-
How to Display Outlook E-mail BoxDear all, I am developing small application ASP.NET and C#. When I click on a name, then an outlook express should be opened to send e-mail to that Name. For this name, I need to assign E-Mail ID Internally. Please tell me, how to do this... Thanks in advance. Regards, Cheguri
-
Split String in ASP.NET with C#.NETDear friends, I have a string like "1-c:/programfiles/DOTNET/VBC/slad.jpg" I want two separate strings from this main string separated by '-' like, '1' and 'c:/programfiles/DOTNET/VBC/slad.jpg' . Can any one please help me in this as I am a trainee employee. Please do the needful. Thanks, regards, Dileep.
-
Dropdownlist control problemDear Friends, I have three dropdownlist controls. When the page loads, first dropdownlist is filled and the remaining two are empty. When I select some value in First dropdownlist then corresponding values to be populated in Second dropdownlist and same When I select some value in Second dropdownlist then corresponding values to be populated in Third dropdownlist. The problem is, Whatever I select in the First dropdownlist automatically the first item only getting selected. Even If I selected the 5th Item, then also the First Item only getting selected. Please solve my problem. Thanks & Regards, Dileep.
-
Accessing Textbox Control in Gridview from Javascript.Dear Jamil, Thanks for your reply. But its still not working. No changes occured, still the textboxes are disabled only. Please dude, since last 2 days I am struggling for this. Please do help me. Regards, Dileep