473,651 Members | 2,635 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Implement a Browse Button in asp.net WebApplication

Hi all,

This is all about ASP.NET WEB APPLICATION...

I have a Button and when i click that button... i need to open the File
Dialog through Which i have to select the Image Path...

And When i press the OK Button of the File Dialog ..... i have to get
the File name selected and set it as TextBox Text and also Show Image
Preview...

Is it possible to implement Browse button in ASP.NET WEB
APPLICATION.... ....

I have used

<input type:file> for selecting the Image Path but could not get the
File Path and Show the PReview Display from it....

Can any One Please help me How to solve this...

Its Urgent.........
PLZ REPLY

Thanks in Advance...

Sanjay.C

Jun 1 '06 #1
2 4852
AFAIK you can't. Though you could perhaps tweak security I believe that
starting with SP2, a web page can't access all local resources even if this
could be considered safe (such as having a src attribute that points to a
local file).

What have you trieed that doesn't work ? (My first thought would be to set
the src attribute of an img tag to the selected file but I believe it won't
work if the file is local, an easy solution if small files would be to
upload the file to the server so that the resource is not local any more).

--
Patrice

<co*******@gmai l.com> a écrit dans le message de news:
11************* *********@i39g2 00...legr oups.com...
Hi all,

This is all about ASP.NET WEB APPLICATION...

I have a Button and when i click that button... i need to open the File
Dialog through Which i have to select the Image Path...

And When i press the OK Button of the File Dialog ..... i have to get
the File name selected and set it as TextBox Text and also Show Image
Preview...

Is it possible to implement Browse button in ASP.NET WEB
APPLICATION.... ....

I have used

<input type:file> for selecting the Image Path but could not get the
File Path and Show the PReview Display from it....

Can any One Please help me How to solve this...

Its Urgent.........
PLZ REPLY

Thanks in Advance...

Sanjay.C

Jun 1 '06 #2
hi! this is amrit.
sameproblem washappening with me as i also develop applicationsin
asp.net using vb.net.
what you can do for this is you can place a hidden field on for the
html controls toolbox,
and then you have to load that URL in that hidden field bvefore loading
it to the image control.

then lateron, you can access that url.
But the problem that i was facing was that i have to load 5 pics at a
time and using 10 hidden fields in form is not a good practice.
take care
have a nice stay..
mr**********@re diffmial.com
mr**********@gm ail.com

Jun 16 '06 #3

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

Similar topics

2
9912
by: Ron Brennan | last post by:
Good afternoon. The entire task that I'm trying to achieve is to allow a user to browse and upload multiple files simultaneously, hiding the Browse button of <input> tags of type="file" and replacing it with a button of my own background color and text. The file paths I'd like displayed in a textarea and then the files uploaded at once.
1
2280
by: Chris Lasher | last post by:
Hello, I'm trying to write a tool to scrape through some of the Ribosomal Database Project II's (http://rdp.cme.msu.edu/) pages, specifically, through the Hierarchy Browser. (http://rdp.cme.msu.edu/hierarchy/) The Hierarchy Browser is accessed first through a page with a form. There are four fields with several options to be chosen from (Strain, Source, Size, and Taxonomy) and then a submit button labeled "Browse". The HTML of the form is...
5
3665
by: Fred | last post by:
Hi I am searching for a module, that would allow me to call files by using a 'browse' button. Is there any uniform module for browsing files, or is there a special module for *.txt files? Thanks Fred
5
5459
by: Ron Brennan | last post by:
Good afternoon. The entire task that I'm trying to achieve is to allow a user to browse and upload multiple files simultaneously, hiding the Browse button of <input> tags of type="file" and replacing it with a button of my own background color and text. The file paths I'd like displayed in a textarea and then the files uploaded at once.
3
31841
by: oopaevah | last post by:
I want to have a separate button which invokes the "browse" button on an input type=file. In internet explorer the following code works ok, in firefox nothing happens. All I do is call click() for the input control. Do you know how to make this work in firefox? Thanks
9
24742
by: Prakash Singh Bhakuni | last post by:
am replacing the default "Browse..." button for input type=file. This works fine except that the form will only submit after the SUBMIT button is clicked twice. Any ideas on why this is happening or a workaround? I'm testing on IE Thanks! <html> <head></head> <body> <form name="test_form" method="post" action="test.jsp">
0
1955
by: sreenulanka | last post by:
when i am clicking the browse button image not opened in my applet please help me. // browse button, generate browse event when it clicks if (e.getSource()==browse) { try{ //filedialog open for choosing directory and file name. FileDialog fd=new FileDialog(f,"Browse..",FileDialog.LOAD); fd.show(); MediaTracker mt = new MediaTracker(this);
4
2395
by: developing | last post by:
Hi All, I have a browse button that the user can click to select a file. The button then fetches the file path. This is all working fine except my boss wants some add functionality. I need it to be so that the user can only access Z: and Y: and not W: or X: Any help is highly appreciated. Thanks a lot The current code I am using is is posted below. (this works just fine) Option Explicit Option Compare Database
1
2036
by: ipa | last post by:
Hello, I made one browse button in asp form to store files. Now i am facing the problem is when i am editing that asp form. In that i call browse button during edit.but during edit, that browse button does not fetch or say show the old file path. I wish to show that save file path in browse button of asp form during edit. Can any one guide.
0
8347
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8694
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...
0
8571
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
6157
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
4143
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
4280
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2696
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1905
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.