473,398 Members | 2,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

How to populate a Browse file's Textbox based on file selected in other Browse txtbox

Hi,

I have a form "FormA" which three browse button and texbox control.

There two radio buttons at the top with option
option1: Auto
option2: Manual

These option decides how to select a file through Browse dialog button

When user select "Auto" option and out of three Browse dialog controls, two gets disabled (i.e grayed out) and only one dialog file remains active.

User selects "browse" button against this active browse dialog control and select a particular file from a folder. Folder contains atleast three files in format as shown below:

Sine Survey AVI-2009-Spectrum.txt
Sine Survey AVI-2009-Controls.txt
Sine Survey AVI-2009-Limit-Channels.txt

When Auto option is selected, User is bound to select "Sine Survey AVI-2009-Spectrum.txt" file in the ONLY ACTIVE dialog box control from this folder.

What i am trying to do is that if user select first file in First Browse Text box then, in other two Browse textbox control should show other two files path (and both remain grayed out).
i.e

Textbox2: C:\NewFolder\Sine Survey AVI-2009-Controls.txt
Textbox3: C:\NewFolder\Sine Survey AVI-2009-Limit-Channels.txt

Since there prefix are same and hence i am assuming that i need to look for the file with same prefix in same folder.

Can some one help me on this

Thanks
Prashant
Aug 6 '10 #1
3 2971
NeoPa
32,556 Expert Mod 16PB
You haven't explained the intended logic behind your question Prashant. You've told us what it should do in a single instance rather than the logic of what it should do generally, and the particular instance you use gives very little clue as to what you mean.
Aug 6 '10 #2
The idea behind this it to make "Data Import" of some text files in a Excel sheet.

I have a form for this "Form A" and three browse dialog button as mentioned above.
Form A also has Import Button (I have done the import part)
Now user select three files (these files have same prefix as i have given example in my above comment) from each Browse Dialog controls and their respective paths display in corresponding textboxes
When user clicks on Import button, the data in three different worksheets get imported from three PATHs.

Now as you can see, user has to choose three files through three different browse button. To make it more faster, I am using "Auto" option. So if Auto option is selected and then by just selecting "First Text file" through one of the Browse button, paths of the other two related files (with same prefix) should get Populated in other two Browse Textbox controls. This way user will have to browse and select one file instead of three that was happening earlier. And now user can Import data using Import button(Import button click event read paths from three control and then import data in excel sheet)

Hope this helps
Thanks
Prashant
Aug 6 '10 #3
NeoPa
32,556 Expert Mod 16PB
Not greatly I'm afraid. Let me see if I can break this down for you :
  1. What do we know about the files?
  2. Are they all in the same folder?
  3. Do we get the folder information from the first browse control?
  4. Is the prefix for the files the same for all the files we want to import?
  5. How do we recognise what part of the name is the prefix?
  6. Are there always exactly the same number of files with set values in the name after the prefix?
    EG.
    C:\Folder\Prefix1_RestA.Txt
    C:\Folder\Prefix1_RestB.Txt
    C:\Folder\Prefix1_RestC.Txt
    C:\Folder\Prefix2_RestA.Txt
    C:\Folder\Prefix2_RestB.Txt
    C:\Folder\Prefix2_RestC.Txt
Aug 6 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: ASP Spam Fighter | last post by:
Hello all, I don't know how to get around this one... If anybody can help me with this problem, I would appreciate it very much. I've been trying to send a (large) file to the browser via a...
12
by: Mike Brashars | last post by:
Hi all, I have been searching for a week and am unable to find and example to "Populate picklist from directory and return file name". I have a php script that reads a log file and plots a...
4
by: Ram | last post by:
Dear All, Good Day I am trying to convert a file which is generated on AS400 with codepage 00420 (arabic & English data combination) with no success. But using the same code( and changing 20420...
3
by: Mathew George | last post by:
Hello, i have an html file having a html input button type=file. I want to replace the default browse text name with some other name if possible i want to place an image and onclick of the...
4
by: Husam | last post by:
Hi EveryBody: How can I load data from text file to textBox ? any help will be appreciated regard's Husam
2
by: Jack | last post by:
Hello, I am trying to populate a Treeview from a XML File. XML File: <Papers> <Paper> <PaperName>New York Times</PaperName>
0
by: Sean | last post by:
Case: Populate a DetailsView with an XML file. XMLDataSource control doesn’t ask for a schema. Just the XML, a transform file (xsl) if applicable (which its not in my case), and one Xpath...
2
by: jzheng22 | last post by:
Hi all, I am new to VB .NET. I am currently wring a simple GUI, a TextBox (multilined), a button and an OpenFileDialog. When user click the button, the OpenFileDialog fired and after user...
0
by: Patrick | last post by:
Hi, Im trying to populate my treeview control onmy webpage with the information that is stored in a xml file, but i cant seem to find any good references about it. The xml file looks like this. ...
2
by: BASSPU03 | last post by:
I used the Common Dialog API to store file paths on my form's underlying table. These paths are displayed in a textbox that I can click to open the selected file. Having stored the file paths in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.