Why the file name disappeared?

L

lynn

I'm using Visual Stdio . NET to do a web application now. I have some
web controls in the web page, one is a File Field (File Browser),
another one is CheckBox. The File Field is a html control and I set
it to run at server. The CheckBox is Web Form control. After I choose
the file in File Field the textbox in File Field will show the file
name I choosed. The problem is after I check the CheckBox the file
name removed. If I use a TextBox instead an Browser to type the file
name this won't happen.

Who knows what's going on here and how to fix it?

Thanks a lot

Ling
 
S

srinivasasarma

check for autopostback property value of the check box
whether it was set to true or not.

if it's true,whenever you check the check box the page
will be posted back.Therefore value will not be maintained
for HTML file control.
if it's so ,change the autopostback value to false.
or
if you want that value to set to true only...then
to maintain the value in file control,u can take a HTML
Hidden control runat=server to store the file name.
i hope this will help you
 
L

lynn d

Yes. I need to set the checkbox autopostback equal to true for some
reason. I'm the new one for web design. I'll try to learn how to use
hidden control. If you can tell where can I get the information that
will good.

Thank you very much!

Ling
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top