OpenFileDialog ודפי ASPX

daniello

New member
OpenFileDialog ודפי ASPX

האם מישהו יודע כיצד ניתן לפתוח OpenFileDialog ולהציג תיבת דו שיח של פתיחת קובץ על דפי ASPX. ואיזה טיפוס אובייקט צריך לקבל : frm.showdialog
 

gilad g

New member
אמממ...

יכול להיות שהתכוונת ל..:
<input type="file" runat="server" />​
 

daniello

New member
לא זו הכוונה

לא..בסה"כ יש לי דף ASPX ואני מעוניין לפתוח dialog box לפתיחת קובץ. זה לא כ"כ טריוויאלי כי הלקוח מקבל HTML ןאני אמור להקפיץ לו חלון. כשאני מנסה לעשות את זה כמו תמיד ...מתקבלת הודעה שאומרת : It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
 

gilad g

New member
דרך דוט נט, זה בלתי אפשרי...

אתה צריך לעשות את זה בלקוח, ע"י javascript.
 
אולי זה יעזור...

האם זה מה שאתה מתכוון? אם כן אשמח להוסיף הסברים. <form id="test" method="post" encType="multipart/form-data" runat="server"> <INPUT id="filmUpload" type="file" name="File1" runat="server"> </form> ואז אפשר להשתמש ב- filmUpload.PostedFile.ContentLength filmUpload.PostedFile.FileName filmUpload.PostedFile.SaveAs(tmpFileName) בהצלחה
 

daniello

New member
שלשוקולדמריר

אני מתכוון לכתוב את הקוד ב - VB.NET ולא תחת ה - HTML. האם יש לך איזה כיוון ?
 
למעלה