473,657 Members | 2,535 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Load contents of a text file into a text box

How can I display a file open dialog by clicking a button in an aspx page,
have the user select a text file then display the contents into a control
such as a text box
Nov 17 '05 #1
1 2739
I don't know if you could open a file using client-side script. This
don't sound right from a security point of view. However, you can have
the user upload the file to your webform. Your webform then opens the
file on the server, reads its contents, and populate it to the textbox
and return to the client.

The following is some sample HTML code that will show a open file
dialog box on the client-side and allow the user to upload a file.

*************** *************** **************
<html>
<body>
<form name="form1" action="form1" enctype="multip art/form-data"
method="post">
<p>
Type some text (if you like):<br>
<input type="text" name="textline" size="30">
</p>
<p>
Please specify a file, or a set of files:<br>
<input type="file" name="datafile" >
</p>
<p>
<input type="submit" value="Send">
</p>
</form>
</body>
</html>
*************** *************** **************

Tommy,

"Jeremy Chapman" <No****@please. com> wrote in message news:<eu******* *******@TK2MSFT NGP09.phx.gbl>. ..
How can I display a file open dialog by clicking a button in an aspx page,
have the user select a text file then display the contents into a control
such as a text box

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2064
by: picaza | last post by:
hi, i am using the perl DBI. -- how can i make load_file read a blob. it treats the file contents as a string rather than text/blob. -- is there an ENV or mysql var to tell the engine where to find files you want to load? mysql looks in ~ by default and i know i can use a full path but it is reather long and cumbersome.
5
3301
by: Ben Long | last post by:
Hi All, A partner of mine has been charged with identifying a performance / load problem currently experienced on one of our websites. I'm thinking it may be a combination of HTML formatting and syntax along with the number of images (<img> tags) being used on a single page. The problems seem to persist around IE (5.0+ on multiple win OS), however FF 1.0 sometimes chokes but usually clears once the images are loaded.
1
15935
by: Greg Patrick | last post by:
My problem: I load an some assemblies (strong named) from a byte array using Assembly.Load(byte). They load fine. But one one of them is actually accessed, it's referenced assemblies can't be found on disk and I get a TargetInvocationExeption. For example, let's say I have a C# win forms application called Prog. Prog.exe uses Assembly.Load(byte) to load two C# class library assemblies,
0
3309
by: M | last post by:
Hi There, I am having lot of trouble getting out the ASP.NET "dll hell", i hope i can find the help here. i have coded a simple page using Visual Studio compiled it. keep on getting works on my computer but when i put this page on the test sever online on which i have very control and can't recompile over there. i keep on getting error could not load type "_default". Code for the page is as follows <!------------------------- HTML PAGE...
14
15081
by: Mr.D | last post by:
How do I save/load the contents of a Treeview to a file? I have found several good examples written i VB6, but not a single one for VB.NET. Please help. ---- Tim
4
2204
by: Ravi Ambros Wallau | last post by:
Hi: We developed a set of ASP.NET Web Applications that never runs in stand-alone mode, but always inside a portal (Rainbow Portal). All modules are copied on that portal. My question is: load time takes, sometimes, three or four of minutes in a medium-level machine (a PIII 1.5 Ghz), when the binary contents are changed, or if the time of last modification of the web.config file is changed. An application that runs in "stand-alone" mode...
2
2175
by: SuperMario | last post by:
Hello, We have a web site using CLASSIC ASP, and a client with what would appear to be a non conforming XML document. Their remote XML document in its entirety looks like so: <?xml version="1.0" encoding="utf-8"?> <string xmlns="http://clients.domainname.net">qwerty500</string>
8
3243
by: amphetaman | last post by:
Is there a safe (unlikely to cause overflows or segfaults) way to load a text file into a char ** array? I thought of using getline, but it needs a fixed-length string, and I don't know how many lines or characters per line the file has.
3
3005
by: Sunny | last post by:
Hi, Can someone tell me, How to load the Body Html from a text file that contains javascript. to Manage my files I am creating an Index Page. <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title></title>
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8513
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8617
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.