My source safe asp.net c# file shows like each line with the box and Chinese language characters.
using System;?????? ?????????????
What is my problem, Its may settings problem or hacking...?
Plz help me....
View Complete Post
I have a flat file(.csv) which contains data(strings incuding date in yyyy-mm-dd format).This i am using in Flat File Source and want to export those data to an Excel Destination.Before exporting to Excel Destination i have created a Derived Column
component where i am using an express to get day,month,year part and creating a date sting in dd/mm/yyyy format then conveting it to DT_DATE datatype and then exporting to Excel Component.But while exporting to Excel this date format is getting changed
to mm/dd/yyyy format.
The expression i used in derived column is
(DT_DATE)(SUBSTRING(date,9,2) + "/" + SUBSTRING(date,6,2) + "/" + SUBSTRING(date,1,4))
where date is a column from Flat File Source.
Even I changed the Locale to English(United Kingdom) in Flat File Connection Manager for the above .csv file.But still it didnt work.
I searched a lot in google and failed to get any solution on this.
Can anyone help me in solving this issue ?
I am trying to simply extract an excel data from an uploaded file an put it into a datatable. In this case the excel file has 3 rows but when I fill the datatable I only see row count of 2.
I tried changing HDR:NO; to HDR:YES and vice versa, but no luck.
What am I doing wrong? (Note: the excel file cannot have a headerrow)
string connstr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + pFilePath + ";Extended Properties=\"Excel 12.0;IMEX=1;HDR:NO;\"";
OleDbConnection conn = new OleDbConnection(connstr);
DataTable dtTables = conn.GetOleDbSchemaTable(System.Data.OleDb.OleDbSchemaGuid.Tables, null);
string strTablename = dtTables.Rows["TABLE_NAME"].ToString();
string strSQL = "SELECT * FROM [" + strTablename + "]";
OleDbCommand cmd = new OleDbCommand(strSQL, conn);
DataTable dt = new DataTable();
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
//At this point row count=2 which doesn't make sense
Steps I have followed are1.I have created myres.en-GB.resx file at C:.2.then created locale specific myres.en-GB.resources using resgen at c: only,resgen c:\myres.en-GB.resx 3.Linked the Resource File to Assembly using AL.exe which is giving me assembly at c: only.Al /t:lib /embed:myres.en-GB.resources /out:ClassLibrary1.dll4.I have created one web application using vs 2008 & then build it.5.Then placed both resource file & dll in web applications Bin\en-GB folder.6.Anf finally written code at page load like CultureInfo info = new CultureInfo("en-GB"); Thread.CurrentThread.CurrentCulture = info; Assembly asd = Assembly.Load("ClassLibrary1"); ResourceManager res = new ResourceManager("myres.en-GB", asd.GetSatelliteAssembly(info)); string sdf = res.GetString("Lab1");
but after running application I m getting following errorMissingManifestResourceException", "Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Cla
I am restoring my asp 2.0 app from a source control project to my local drive.
The application was originally created on a different PC but was created with Visual Studio 2005,
The source control add-in (Harvest) is not working correctly so I retrieving and saving my web app
outside of Visual Studio.
I finally put all the pieces of the web app back together but now when I compile my app I get the following message:
Build (web): Could not load the assembly 'App_Web_myApplication.master.cdcab7d2'. Make sure that it is compiled before accessing the page.
Will I have to start over ?
Thanks for your insights !
I am using a download handler to handle the downloading of files from my website. I am using a slightly modified code from the Microsoft article http://support.microsoft.com/kb/812406
Everything is working fine and downloading, even with large files, but it does not show the file size for any of the files to download. Even if theyre really small.
Here is my code for the handler
public class DownloadHandler : IHttpHandler
public void ProcessRequest(HttpContext context)
string path = "";
path = context.Server.UrlDecode(context.Request.QueryString["src"]).DecryptString();
System.IO.Stream iStream = null;
byte buffer = new Byte;
string filename = System.IO.Path.GetFileName(path);
iStream = new System.IO.FileStream(context.Server.MapPath("~/" + path), System.IO.FileMode.Open,
Hello everyone. I am having an issue downloading files that I have store in SQL Server. I have no problem in a WinForm. What am I doing wrong in my code?
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim sch As New clsReport
Dim fileData As New clsReport.Letter
fileData = sch.DownloadLetter(Session("LetterID"))
Dim ms As System.IO.MemoryStream = fileData.fil
Dim fil As Byte() = ms.ToArray
Dim nam As String = fileData.name
Dim ext As String = fileData.ext
If Not fil Is Nothing Then
Response.AppendHeader("Content-Disposition", "attachment; filename=" + nam & "." & ext)
' Response.AddHeader("Content-Disposition", nam & "." & ext)
Response.ContentType = "Application/octet-stream"
Response.Buffer = True
Catch ex As Exception
i have 200 rows in my excel file. im using OleDbConnection to read the excel file.
The problem is that it will read all the blank rows from row 200 onwards. Is there a configuration im missing ? or is there a way to import all rows that has data? Here's some of my code.
string excelConnectionString =
"Data Source=" + filePath + ";" +
"Extended Properties=Excel 8.0";
OleDbConnection excelConnection =
new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filePath + ";Extended Properties='Excel 8.0;HDR=NO'");
OleDbCommand cmd = new OleDbCommand("Select * from [list$]",excelConnection);
I have a word document to be generated using ASP.Net/VB.net.
So I have a word document template saved as .mht file on the web server.
In my ASP.Net code,I read this mht file content and replace certain string line Description$$ with the actual description from the database.Then save this content as .doc file.
This works fine but shows a box symbol when I have smart quotes " (not this one as I cannot type it here.The double quote which you see in MS Word,the slanted double quote).
I dont know how to make my word doc generated, show the exact double quote as in MS word.
If any of you have any idea of this please reply.