Click here to Skip to main content
15,891,597 members
Home / Discussions / C#
   

C#

 
GeneralRe: opening a child form from a dialog Pin
Bill Dean19-Feb-04 1:40
Bill Dean19-Feb-04 1:40 
GeneralRe: opening a child form from a dialog Pin
visiontec19-Feb-04 11:45
visiontec19-Feb-04 11:45 
GeneralRe: opening a child form from a dialog Pin
Bill Dean19-Feb-04 17:46
Bill Dean19-Feb-04 17:46 
GeneralRecord sound from sound card Pin
suki_yip18-Feb-04 15:21
suki_yip18-Feb-04 15:21 
GeneralRe: Record sound from sound card Pin
Heath Stewart19-Feb-04 4:43
protectorHeath Stewart19-Feb-04 4:43 
GeneralEos: aspect-oriented extension for C# Pin
Hridesh Rajan18-Feb-04 15:08
Hridesh Rajan18-Feb-04 15:08 
GeneralAutomate Legacy 3270 Applications Pin
John Kuhn18-Feb-04 14:36
John Kuhn18-Feb-04 14:36 
Generalpostback problem Pin
pardu18-Feb-04 14:34
pardu18-Feb-04 14:34 
Hi Guys,

I have a problem regarding postback. I hid the <input type=file>
html control named myFileBrowser and simulated a click event to this
html control using javascript. After selecting a file in the Open
file dialog, i copied the contents of the file html control into
another input box named dummyfile. However, I noticed that I had to
click the <asp:Button> (named Button1) twice before I get a
load/postback event in my c# code. I placed a breakpoint in the
Page_Load method of my c# code to check this. I also tried
submitting the form (named Form1) in the javascript part right after
copying the contents of myFileBrowser to dummyfile, but it
complained of an error. The error was "Access Denied" with Code = 0.

Can anybody help me regarding this problem? Been stuck with this for
a long while now. The code is below for your reference.

Many thanks in advance.


-Chris

<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<p>File Name: <input id="myFileBrowser"
style="DISPLAY: none" type="file" size="60" name="filAttachment"
runat="server">
<input id="dummyfile" type="text"
onchange="document.getElementById('myFileBrowser').value =
this.value;"
size="60"> <input
onclick="document.getElementById('myFileBrowser').click();
document.getElementById('dummyfile').value = document.getElementById
('myFileBrowser').value; return false;"
type="image" height="20"
width="40" src="file:///C:\Inetpub\wwwroot\_imgs\btn_off_cal.gif"
name="browse">
</p>

<input id="btnOk" title="Ok" type="button"
value="Ok" name="btnOk" runat="server">
<input id="btnCancel" title="Cancel"
onclick="doOnCancel()" type="button" value="Cancel"
name="btnCancel">
<asp:Button id="Button1" style="Z-INDEX:
101; LEFT: 344px; POSITION: absolute; TOP: 152px" runat="server"
Text="Post Back"></asp:Button></form>
</body>

GeneralRe: postback problem Pin
Nick Parker18-Feb-04 18:17
protectorNick Parker18-Feb-04 18:17 
General&quot;Minimize to tray&quot; button in title bar Pin
josefg18-Feb-04 12:30
josefg18-Feb-04 12:30 
GeneralRe: &quot;Minimize to tray&quot; button in title bar Pin
Heath Stewart19-Feb-04 4:38
protectorHeath Stewart19-Feb-04 4:38 
GeneralRe: &quot;Minimize to tray&quot; button in title bar Pin
John Fisher19-Feb-04 5:16
John Fisher19-Feb-04 5:16 
GeneralControlling file permissions Pin
james-cxx18-Feb-04 12:05
james-cxx18-Feb-04 12:05 
GeneralRe: Controlling file permissions Pin
Russell Morris18-Feb-04 12:27
Russell Morris18-Feb-04 12:27 
GeneralRe: Controlling file permissions Pin
james-cxx19-Feb-04 6:51
james-cxx19-Feb-04 6:51 
GeneralWriting to MXL File Pin
Mr_Mike18-Feb-04 11:27
Mr_Mike18-Feb-04 11:27 
GeneralRe: Writing to MXL File Pin
Kentamanos18-Feb-04 12:50
Kentamanos18-Feb-04 12:50 
Generalgetting MX servers for mail validation Pin
blakeb_118-Feb-04 10:41
blakeb_118-Feb-04 10:41 
GeneralRe: getting MX servers for mail validation Pin
Heath Stewart18-Feb-04 11:11
protectorHeath Stewart18-Feb-04 11:11 
GeneralStrange remoting issue Pin
lustuyck18-Feb-04 9:40
lustuyck18-Feb-04 9:40 
GeneralRe: Strange remoting issue Pin
Heath Stewart19-Feb-04 3:34
protectorHeath Stewart19-Feb-04 3:34 
GeneralRe: Strange remoting issue Pin
lustuyck19-Feb-04 3:49
lustuyck19-Feb-04 3:49 
GeneralRe: Strange remoting issue Pin
Heath Stewart19-Feb-04 3:52
protectorHeath Stewart19-Feb-04 3:52 
GeneralRe: Strange remoting issue Pin
lustuyck19-Feb-04 3:59
lustuyck19-Feb-04 3:59 
Generalmultiple choice using if else Pin
notsosharp18-Feb-04 8:35
notsosharp18-Feb-04 8:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.