JScript for the .NET Framework
To display a Yes/No dialog box after reading a file !!
Hi, I have a scenario where I need to look out for a file & if it exists then I need to popup a dialog box with YES/NO buttons prompting the user to select either of the two buttons. If the user selects YES then I will execute some block of code & similarly for NO. I have used confirm method using JavaScript, but it shows OK/CANCEL & I have called it on click event. Here I am not going to call in the click event where as after searching a file. Please find below the code I have used so far, protected void btn_submit_Click(object sender, EventArgs e) { READFILE(); } private void READFILE() { try { string FILE_NAME = "appset.txt"; if (File.Exists(FILE_NAME)) { // I need to populate the message box here like “Are you want to update?” // if YES { Some code here } // if NO else { Some code here } } } catch (Exception EX) { Alert.Show(EX.Message); } } Regards,Karthizen
Hi,With the help of one gentleman I realised the error in flow of the application & I redesigned the application in such a way that it will look out for the file during page load event, I have called the OK/CANCEL dialog on button click & depending on the existense of file, it will update the file.Thanks,Karthizen
Related Links
JavaScript to Open Word 2010
Change td width dynamically
sql and javascript
Multiple nested Modal Popups
Drag and Drop Images from a Toolbox using javascript
Microsoft jScript runtime error
how to make a screen Like this?
Not Understand javascript code compatible with IE
how to find a texbox control inside a datagrid using javascript
ajax controls similar to office on web application
Create new HTML Helper for Search button
IE7 showmodaldialog displays unnecessary scroll bar with content
Javascript client server download speed help
Help i am getting this error 'Runtime error: unable to load dll jscript." can anybody help?
scrollbar in asp ListBox control
De-serialize Json in WPF