.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

how to load data in file XML to richtextbox

Posted By:      Posted Date: October 15, 2010    Points: 0   Category :Windows Application

 am developing a windows application, in which I am giving two options to the user for the file selection.

1. Open File Dialog

2.select  file 

3.load data in file to richtextbox


View Complete Post

More Related Resource Links

Could not load file or assembly "System.Data.DLL" or one of its dependencies

Could not load file or assembly "System.Data.DLL" or one of its dependencies

Unable to load data from txt file with text delimiter specified, if the data has the same character


Have come across a strange scenario and seeking your ideas/thoughts.

I'm using a ssis package to load a txt file. The txt file is text delimited by double quote (") and column delimited by tilde (~). It works fine in most scenarios and strips the enclosing "" from the columns -no problems there. However, in a specific scenario where the last column has double quote in the data as well being the text delimiter, the package throws the following exception indicating that it's missing a column delimiter

 The column delimiter for column "COL_NAME" was not found

This behaviour was not observed when double quotes were present as data in any other column in the file. Was able to workaround by disabled text delimiter only for the last column, but that isn't a perm solution. Also observed that if the " was replaced by escape sequence /" the file loaded successfully. Wondering if this a known issue ?


system.io.fileloadexception - could not load file or assembly system.data.sqlserverce version=3.5.1.



my application raises this exception but the file system.data.sqlserverce.dll is in the folder of the application, and the version is correct.


do u have any idea about this problem ?


thanks in advance for every answer Smile


hello from switzerland !



load data in file to textbox

private void button1_Click(object sender, EventArgs e)
            OpenFileDialog fs = new OpenFileDialog();
            fs.InitialDirectory = "x:\\";
            fs.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
            fs.CheckFileExists = true;
            fs.RestoreDirectory = true;
            fs.InitialDirectory = Application.StartupPath;

            if (fs.ShowDialog() == DialogResult.OK)
                rtxtbox.LoadFile(fs.FileName);    //i have a problem in this here

how to load data with the file name?


We are loading data from xls/txt/csv files into our existing Db tables, but with this we want to also store file name into our table column, how to achieve it?


Load XML data (string format - not file) into a gridview




 I need some help help loading some XML tagged data I received as a reply from a Web Service (String format), into individual fields on the web form.


After spending some time,  I was able to load an XML file into a gridview using this code...

<?xml version="1.0" encoding="ISO-8859-1"?>
        <title>Empire Burlesque</title>
        <artist>Bob Dylan</artist>
        <title>Hide your heart</title>
        <artist>Bonnie Tyler</artist>
        <company>CBS Records</company>

Could Not Load File or assembly 'MySql.data'



I am trying to test website on a remote server to see if I can read or write to a MySql Database.

In VS Web developer 2010 Express edition, I created a new website and saved it via ftp on the remote host. I have added the 'Mysql.data.dll' to the website and placed it in the bin directory of the project.

When I try to run the program i get "Could not load File or assembly MySql.Data, Version=, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.

Line 4:  		<compilation debug="true" urlLinePragmas="true">
Line 5:        <assemblies>
Line 6:          <add assembly="MySql.Data, Version=, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>
Line 7:        </assemblies>
Line 8:      </compilation></system.web></configuration>

The remote server supports .Net v2, so I have made my application focused on v2 framework.  I have tried similar code on my local machine and works fine.

Can anyone pls advice what I might be doing wrong?



Could not load file or assembly 'System.Data.SqlServerCe, Version=,...

We have an application that runs on both Windows Mobile and Desktop, both which are now using SQL Server Compact 3.5 SP1 as the database.  Everything is working great on the WM side in debug and runtime, but on the desktop side we are getting the following error.

"Could not load file or assembly 'System.Data.SqlServerCe, Version=, Culture=neutral, PublicKeyToken=3be235df1c8d2ad3, Retargetable=Yes' or one of its dependencies.  The given assembly name or codebase was invalid.  (Exception from HRESULT: 0x80131047)"

I do not get this error when I run in debug mode for the desktop app, but if we install the application to a Vista (32bit) or Windows Server 2003 (32bit) machine we get the error.  The only thing I can point at that is different between all the different machines we have tried this on is that it always works if Visual Studio is installed on the machine.  

Our current deployment method is to mark the System.Data.SqlServerCe ( reference to Copy Local=False and then we package the SQL Server Compact 3.5 SP1 installer with our installation program.  I have verified that the dll's are in the GAC with the correct version, but the application cannot find an assembly.  I have also tried copying all the sqlce*.dll files (a

huge number of data from database ... so how to minimize load time


Hi ...

I have used the above method to configure my crystal report ...

Its working fine , But i have huge number of data in database ....

So , it take long time to load the report ...

So , i have decided to show only the last 50 records inserted into the database , not all the 500 records to be loaded every time.

Plz help me with this issue  ...


Also , Plz explain me abt index legend in crystal report.

Need Oracle Data Provider .CS File for Oracle 10g Database connection !



I need a 'Wrapper.cs' file which takes care of the Database connection ( Oracle 10g) where

i can just call the method with my SQL Query


Gridview1.DataSource = SampleWrapper.ExecuteDatatable("THE SQL QUERY");


Plz Post the link if there is any open source !    

convert SQL data to EDI 835 file


I was assigned to create a app to convert SQL data to EDI 835 file. (Electronic Data Interchange file for Health Care Claim Payment/Advice,  outbound process only).

Can someone help me where to start?

Could not load file or assembly - Web Deployment Project



I have the following projects in a solution :

- A Web Application

- A Class Library

- A Web Deployment project

The Web Application compiles and run fine when I don't go through the Web Deployment Project. However when I try to use that, I get the following error:

Error 1 An error occurred creating the configuration section handler for hibernate-configuration: Could not load file or assembly 'NHibernate' or one of its dependencies. The system cannot find the file specified. (F:\Folke\Folke.csproj_deploy\Release\web.config line 4) 1 1 Folke.csproj_deploy

"An error occurred creating the configuration section handler for hibernate-configuration: Could not load file or assembly 'NHibernate' or one of its dependencies. The system cannot find the file specified. (F:\Folke\Folke.csproj_deploy\Release\web.config line 4)"

This is the beginning of my Web.config:


Data: More Load, Less Code with the Data Enhancements of ASP.NET 2.0


A data source control is a server control that wraps some basic functions of a data source - be it a SQL Server database, an XML document, an Excel worksheet, or a sitemap description. Through the services of a similar component, data-bound controls can fetch data as well as insert new records or update and delete existing ones. Data source controls enable a consistent model across a variety of data sources and dramatically reduce the amount of code needed to implement a two-way data-binding scenario. This article provides an introduction to data source controls and other related data binding features.

Dino Esposito

MSDN Magazine June 2004

Parser Error Message: Could not load type MasterPage File



Server Error in '/' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'wamsilverlight.Web.Wam'.

Source Error:

Line 1:  <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Wam.master.cs" Inherits="wamsilverlight.Web.Wam" %>
Line 2:  
Line 3:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Source File: /Wam.Master    Line: 1

Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4927


All of the following have been tried over and over again:

1.) Delete all existing .dlls

2.) Delete MasterPage File and recreate it.

3.) Delete MasterPage perform a c

Ajax Accordion to load data from client click event


I have a Ajax Accordion control on my page with treeview in Content Template. As the treeview for each pane are big. I am wondering whether I can load the treeview from codebehind only after the pane is selected. I can reuse the code from ItemDataBound of Accordion control.

Create excel file from Binary data on SqlServer



My requirement is that i upload an excel file then i need to validate that data.


1. Uploading file using using upload control saving binary in SqlServer

2. Then i am creating file from binary data  on Sql Server using below command and then using OPENROWSET to dump data to Sql table

3. Then reading Sql Table row wise and validating data.


Alter Procedure spUploadExcelFile
  @PKID int,
  @BatchID int


	Declare @VarBin varbinary(max)
	Declare @FileName varchar(100)
	DECLARE @sql nvarchar(MAX)
                DECLARE @errMsg nvarchar(MAX)
	DECLARE @ObjectReturn INT
	DECLARE @ErrorSource VARCHAR(255)
	DECLARE @ErrorDesc VARCHAR(255)
	DECLARE @ObjectToken INT

	Select @VarBin  = Content , @FileName = [FileName] from MultilangBinaryData Where PKID = @PKID
	SET @FileName = 'C:\'  + @FileName
	EXEC sp_OACreate 'ADODB.Stream' @ObjectToken OUTPUT
	EXEC sp_OASetProperty @ObjectToken, 'Type', 1
	EXEC sp_OAMethod @ObjectToken, 'Open'
	EXEC sp_OAMethod @ObjectToken, 'Write', NULL, @VarBin
	EXEC sp_OAMethod @ObjectToken, 'SaveToFile', NULL, @FileName, 2
	EXEC sp_OAMethod @ObjectToken, 'Close'
	EXEC sp_OADestroy @ObjectToken  
	SET @sql = 'INSERT INTO dbo.UserBulkData SELECT 0,NULL,'+ @BatchI

Using the single *.rpt file with multiple data sources


I've created a set of CrystalReports (*.rpt files) for an ASP.NET web app on a development server. I call each report using the following code:

protected void BTN_RunReport_Click(object sender, ImageClickEventArgs e)
CrystalReportViewer_ClientLetter.Visible = true;

ConnectionInfo con = new ConnectionInfo();
con.ServerName = Constants.ServerIP;
con.DatabaseName = Constants.DatabaseName;
con.UserID = Constants.UserID;
con.Password = Constants.Password;

CrystalReportViewer_ClientLetter.ReportSource = Server.MapPath(Constants.ClientLetters);
ParameterFields parameter = CrystalReportViewer_ClientLetter.ParameterFieldInfo;
ParameterField batchdate = new ParameterField();
batchdate.Name = "@BatchDate";
ParameterDiscreteValue batchdate_value = new ParameterDiscreteValue();
batchdate_value.Value = Convert.ToDateTime(txtBatchDate.Text);

foreach (TableLogOnInfo tlf in CrystalReportViewer_ClientLetter.LogOnInfo)
tlf.ConnectionInfo = con;
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend