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

Categories

MSDN
Windows Phone Development
Visual Studio Design a...
Visual Studio Team Fou...
Data Platform Development
Microsoft Robotics
Windows Server
Office Live Development
Archived Forums C-D
Archived Forums SA-SM
Archived Forums V
Archived Forums W
Skype for Business
Visual Basic
MSBuild
Visual Studio LightSwi...
Test Tools in Visual S...
Register and Manage Ac...
Publishing Windows Sto...
Media Foundation Devel...
Windows Desktop Pro-Au...
Development with the W...
General Office Develop...
Access for Developers
Developing Apps for Sh...
SharePoint 2010 - Usin...
Azure Active Directory
Azure Automation
Azure DocumentDB
Azure Stream Analytics
Azure Security Center
Azure Stack
Azure Data Lake Analyt...
Publishing Apps for th...
Software Modeling Tools
The Architect Role
BizTalk Server RFID
LINQ to SQL
XML, System.Xml, MSXML...
Microsoft Live Labs Volta
Internet Explorer Exte...
Small Basic
Visual Studio Smart De...
SQL Server SMO/DMO
SQL Server Notificatio...
Database Design
SQL Server Manageability
Standard 2009: Tools
Standard 2009: Misc
Windows Embedded Compa...
SQL Server 2012 PowerP...
SQL Server 2012 Spatia...
Windows Forms Data Con...
Windows Live Messenger...
MSDN and TechNet Searc...
WebsitePanel - Develop...
Bing Maps Web Controls
Getting Started with S...
Programming Silverligh...
Retired SharePoint Bus...
Casablanca
CAT.NET
CHESS – Find and Repro...
Core Coding Experience...
Direct3D 10
Chart Controls for .NE...
Getting Started With V...
LightSwitch in Visual ...
MS-Build, Multi-Target...
Network Quality of Ser...
Office Development wit...
Popfly Explorer
Popfly General Discussion
Silverlight (formerly ...
Software Transactional...
SyncFx - Technical Dis...
SQL Server 2014 Setup ...
SQL Server 2014 Integr...
TFS Deployment to Azure
Visual Studio Async CTP
Visual Studio 2008 IDE...
Visual Studio Lab Mana...
Visual Studio Team Sys...
Visual Studio Tools fo...
Windows Error Reportin...
Reporting
Kinect for Windows v1 SDK

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile