Display List Of Html File & Folders From A Shared Folder?

Mar 11, 2011

We have an aspx page that displays list of html file & folders from an shared folder. The html files and folder within this shared folder is being maitained by the end users. These are the static html files. When user clicks on any of the file, our .net code open up that file in the new window.

Recently there was an change in the requirement. End user wanted to display some of the data dynamically in the HTML page. We the asked end users to replace the static/hard coded data(eg. City name) within the html files. Find below sample code for your reference

Existing code in html

[Code]....

New code in html

[Code]....

To achieve this our .net code looks for the tag values(State or City) within the lookup table in SQL DB. It then gets the value from the respective tag from DB and replaces the custom tag with the DB value

Eg: <TAG:DYNAMIC value="State"> is being replaced by the value of the State tag in DB.

In order to achieve this we parse the entire html file and then replace the dynamic tags with the DB value. The parsing happens quick in smaller html files but takes almost 10-12 secs to parse bigger files (around 255KBs). We also noticed that even though we increase the number of our custom tags within the bigger files, the code takes same time to open the parsed html file. So it looks like DB hit is not an issue and looks like the issue lies in the parsing of the files. Find below code that parses the html file

[Code]....

On further analysis we noticed the while loop within the above code takes longer to execute. Let me know if there is any better and faster way to parse bigger html files.

View 1 Replies


Similar Messages:

Data Controls :: Delete Files And Folders Inside Folder In DAL File?

May 7, 2014

how to delete files and that folder in a class file Data access layer file.

View 1 Replies

Download File From Shared Folder On Remote Server

Feb 1, 2010

On remote server i have shared folder. If there any way to download file from this shared folder on local machine? Without using ftp. Server dont have iis or something like this,just have shared folder.

View 1 Replies

Trying To Display A List Of Excel Files That Are Stored In Multiple Folders In A Datagrid?

Dec 23, 2010

I'm trying to display a list of Excel files that are stored in multiple folders in adatagrid but the .GetFiles part of the routine in my loop only gets the very last excel file rather than all that meet the criteria. Below is the code I've been working on for several days. This is the first time I have tried to use a "For next loop," and I am having much trouble with this. Using the same loop code posted I was able to verify that the loop was working by appending some text into a temporary label.

[Code]....

View 6 Replies

Web Forms :: Access Shared Network Folders

Aug 28, 2013

In my application, first, i have not connected to iis server, and trying to access secondary path at this time it is accessing that path. but when it is connected to IIS server, it is giving unathourizedaccess exception.

View 1 Replies

Security :: Non-asp Files / Moved The Pages And Files To Other Folders And Set The Web.config File On This Folder?

Jul 1, 2010

I was following the tutorials from this two sites:

http://www.15seconds.com/issue/070104.htm

http://aspnet.4guysfromrolla.com/articles/020404-1.aspx

Following the first site, it had worked but when I´ve moved the pages and files to other folders and set the web.config file on this folder, now it won´t work at all!!!

The file is an *.swf object. I did put the asapi.dll to map the extension on the website root, I´ve put the

[Code]....

on the web.config new folder and on the web.config website´s root.

It won´t work!!! I can access the file directly!!! on the web.config of the folder that contains the file, there is a <deny users="*" /> line.

View 4 Replies

C# - How To Display A List Of Images From A Folder On Hard Drive

Apr 13, 2010

I am trying to make a simple photo gallery website. Using ASP.NET and C#. Right now I don't have a server set up but I am just using the development one that Visual Studio Starts when you make a website project and run it.

I have a folder on my hard drive that contains an unknown number of images. I want to write a piece of code that will go through each image and add them to the default webpage. I have tried this code but it doesn't work. What am I doing wrong? Should I be using a ListView control or a DataView or something like that? Do I need to add a virtual directory in order to access the images? If so, how do I to that on this test server?

ALSO, how do I set the position and alignment of these pictures? For example, how would I make it so that the pictures are in a line vertically and centered on the webpage?

protected void Page_Load(object sender, EventArgs e)
{
string[] filesindirectory = Directory.GetFiles(@"C:UsersJordanDesktopWeb Images");
int i = 1;
foreach (string s in filesindirectory)
{
Image img = new Image();
img.ID = "image" + i.ToString();
img.ImageUrl = s;
img.Visible = true;
Page.Controls.Add(img);
i++;
}
}

View 3 Replies

Scan For Files In Folder And Sub Folders?

Feb 19, 2011

write a script in Visual Basic.

i want to be able to scan a folder and its sub directories for all the files that exist in it. the results are then feed into a list box or any similar control

additional it would be great if the results are entered and also its path
eg:
File1 C:folder1folder2file1.exe
File2 C:folder1folder2dd.dll
File3 C:folder1explorer.exe
File4 C:folder1folder2folder3document.docx
File5 C:folder1
eadme.txt

View 2 Replies

Need To Iterate Through A Server Share And List Every File Within Every Folder ?

Jun 17, 2010

I need to iterate through a server share and list every file within every folder and write each file name with all of its attributes into a database table.I assume that using the FileInfo class and all of it's properties (CreationTime, DirectoryName etc etc) is the best way but I have no idea of how to start.I'm starting to create a web app

View 8 Replies

Deployed Website Shows It Folder File List?

Mar 9, 2011

I built Deployment package and feed IIS with that, but when I trying to visit my site, I see only files of root folder like FTP Whats wrong ?

View 1 Replies

Web Forms :: Retrieve Sub Folders And Files From A Particular Folder?

Jan 7, 2010

how to retrieve sub folders and files from a particular folder as like windows explorer?

for example ..i am having a folder "config"..

within this folder i am having subfolders as like "images","rss" and also config files..

how to get this in tree view as like windows explorer?

View 3 Replies

How To Get The Unc Share Name Of A Given Folder (If Shared)

Oct 26, 2010

How To Get The Unc Share Name Of A Given Folder (If Shared)?

View 2 Replies

MVC :: Put Partials Somewhere Else Except Shared Folder?

Oct 29, 2010

I have View which loads more than one partials.

[Code]....

It's convinient to me to divide menus for pieces. But number of partials keep growing and it is getting harder to find concrete partial in Shared folder. Can I store partials in view folder which uses this partial? Html.RenderPartial() doesn't have such parameter as Controller Name so I think that it's impossible. But if there are any solutions to solve this inconvinience?

View 2 Replies

Listing Folders In Folders Then Creating Arrays In JS For Each Of The Folders?

Jun 21, 2010

Listing folders in folders then creating arrays in JS for each of the folders?

Directory Structure:

I have a directory structure as follows;

ad_folder
--folderA
--folderB
--folderC
--anotherFolder
--etcfolder
--afile.aspx
--anotherfile.gif
ad_code
--folderA
--folderB
--afile.aspx
--anotherfile.gif
ad_prep
--folderA
--etcfolder
--afile.aspx
--anotherfile.gif
ad_bin
--etcfolder
--afile.aspx
--anotherfile.gif
other Folder
files folder
assetsfolder
index.aspx
web.config
image.gif

Task at hand:

I want code in VB.NET to create javascript arrays of the folder contents that can then be used on the client end. I only need arrays for all folders contained in folders starting with ad_ and an array for all the base folders . like so:

var folders=["ad_folder","ad_code","ad_prep","ad_bin"];
var ad_folder=["folderA","folderB","folderC","anotherFolder","etcfolder"];
var ad_code=["folderA","folderB"];
var ad_prep=["folderA","etcfolder"];
var ad_bin=["etcfolder"];

note that I do not know the number of or the names of the folders, they can be different in different cases, I only have the root path.

[code]...

View 3 Replies

Security :: How To Access Shared Folder

Nov 28, 2010

I am trying to access a shared folder which is located on a different server rather than on the asp.net server.

I configured windows authentication and set impersonation to true. Also try with enable/disable basic authentication.

I have tried the following:

with a mapped driveshared folder access (\sharedfolder)virtual directory pointing to shared folder with pass through configuration. However none of the above works. I am getting "Access Denied" error when trying with shared folder and virtual directory. In the case of mapped drive getting "Not Found" error.

View 4 Replies

VS 2008 / Using Shared Folder Name As Path?

Jul 20, 2012

I have an application where I export some crystal reports to a shared folder like:

Code:
Dim ReportFilePath As String = "XXXXXAutoLoad ReportsReports"
DiskOpts.DiskFileName = ReportFilePath & "" & ReportName
myCrystalReport1.ExportOptions.DestinationOptions = DiskOpts
myCrystalReport1.Export()

My question is: I looks it uses the machine account to access this folder like:

domainvgiwpw03-xxx$ (name of the server is vgiwpw03-xxx2).

Is there a way to programmatically specify which account to use accessing the shared folder? We do not like to use machine accounts as this may change if we switch servers etc.

View 13 Replies

Display Folder Or File Image Based On A Condition

May 21, 2010

Am displaying the contents of a folder(folders n files) in a gridview.In the gridview,file/foldername ,type ,size ,Last modified date columns are displayed.the datasource for this gridview is supplied manually through a datatable.

I need to display folder/file images beside folder/filename.if the datasource is from a database we can give a if condition in the following way.

[code]....

But here in itemtemplate I am binding the data using bind expression instead of Eval .So I could not give if condition here.

How can I display folder or file image based on a condition ?the datasource is provided manually to the gridview not from a database.

View 5 Replies

Security :: Hide Folders And Pages Inside Folder From Crawlers Like Google

Feb 12, 2011

I'm wondering what would be the best solution for hidding a folder like for example "AdminFolder", and also .aspx pages inside this folder.

I have several pages inside "AdminFolder" which I (as "Administrator" :) ) plan to use for some background work on daily basis! I am using Membership shema and no one except me can not / or should not acces this area, but I'am afraid if web crawlers like google find and expose this part of my page in searching results!

I also need to create a second folder for PDF files which I also would like to hide (incl. PDF Files inside it) from web crawlers!

View 3 Replies

Security :: Want To Log Into A Shared Folder On Another Server Using A Different User Name And Password?

Feb 22, 2010

I have an asp.net app written in c# and want to log into a shared folder on another server using a different user name and password.

How do I and can you give me some example code to allow me to connect to a shared folder on another server using a different user name and password.

Once connected, I wish to update a txt file

StreamWriter sw = File.AppendText(@\flcy_fluencyDNC_ListsTenantDNC.txt);
sw.WriteLine(tbTel1.Text);
sw.Close();

View 3 Replies

Security :: Programmatically Set Share Permission To A Shared Folder In C#?

Feb 9, 2010

i have a situation where i need to develop a web system where sys. admin can create a shared folder in server and set who can access the shared folder programmatically.

i've manage to find example to create a shared folder from here:[URL]

and i also manage to find example to add user and set folder Security setting from here:[URL]

My problem is how can i add user in the Sharing permission setting since it is a shared folder. Default sharing setting is set to 'everyone'. This mean anyone in my company can browse to the shared file unless i set everyone security setting. I want to remove "everyone" and add users based on the user that i've already add at Security setting.

View 7 Replies

Web Forms :: Move File From Webserver Folder To Local File System Folder?

Jan 27, 2011

I have requirement to copy or move file from webserver app folder to local file system folder (user selected). How is it possible in ASP.Net.

On my page i have textbox and browse button and user clicks browse button to select folder and there is Copy/Move button and when clicked the files under webserver folder should be move to the user selected folder. The webserver folder path is available to application.

View 1 Replies

Web Forms :: Get A List Or Folders In The App_Theme Directory

Aug 6, 2010

I would like to display a list of all the Themes in the App_Theme directory and allow the user to select the theme they would like to use. Is there already a method that would return the folder name back to me in the app_theme folder?

View 1 Replies

Private Shared Vs Public Shared Vs Protected Shared

Jan 5, 2010

let me know what does these access modifiers means.private shared vs public shared vs protected shared

View 5 Replies

C# - Allowing User To Save Contents Of Html List To Text File?

Dec 2, 2010

I'm working on an application (ASP.NET, Webforms) that generates a list of outputs based on a user input. I want to allow the user to save the contents of said list as text file, or possibly as other filetypes such as .csv. What is the best way to approach this? Can it be done client-side with Javascript?

View 2 Replies

AJAX :: Display Directory (Folder) Structure For Folder Outside Project In TreeView Control

Nov 22, 2015

[URL] ....

In above link you clearly describe (How to display directory folder structure).  

The path only works when the folder insight the project.

When I put folder outside the project it didn't work. What type of changes I need to made to acces the folder outside the poject. & How can I show other details of files which are including in folders Like. Last Modified Created Date, Modified Date etc..

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved