473,609 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hold Execution

windows_mss
13 New Member
Expand|Select|Wrap|Line Numbers
  1. using System; 
  2. using System.Collections; 
  3. using System.ComponentModel; 
  4. using System.Data; 
  5. using System.Drawing; 
  6. using System.Web; 
  7. using System.Web.SessionState; 
  8. using System.Web.UI; 
  9. using System.Web.UI.WebControls; 
  10. using System.Web.UI.HtmlControls; 
  11. using System.Data.SqlClient;  
  12. namespace TestMsgBox 
  13. {     
  14. /// <summary>     
  15. /// Summary description for WebForm1.     
  16. /// </summary>
  17. public class WebForm1 : System.Web.UI.Page     
  18. {         
  19. SqlConnection con = new SqlConnection(@"Server=IISSERVER;DataBase=TestSenthil;uid=sa;pwd=sa;");         
  20. protected System.Web.UI.WebControls.Button btAdd;         
  21. protected MsgBox.WebMsgBox MsgBox;         
  22. protected System.Web.UI.WebControls.Button btNo;         
  23. protected System.Web.UI.WebControls.Button btYes;         
  24. protected System.Web.UI.WebControls.TextBox TextBox1;          
  25. private void Page_Load(object sender, System.EventArgs e)         
  26. {             
  27. // Put user code to initialize the page here         
  28. }          
  29. #region Web Form Designer generated codeoverride protected void OnInit(EventArgs e)         
  30. {             
  31. InitializeComponent();             
  32. base.OnInit(e);         
  33. }          
  34. private void InitializeComponent()         
  35. {             
  36. this.btAdd.Click += new System.EventHandler(this.btAdd_Click);         
  37. this.Load += new System.EventHandler(this.Page_Load);         
  38. }         
  39. #endregion          
  40. private void btAdd_Click(object sender, System.EventArgs e)         
  41. {             
  42. SqlDataAdapter da = new SqlDataAdapter(" select * from ScrTest",con);             
  43. DataSet ds = new DataSet();             
  44. da.Fill(ds,"ScrTest");             
  45. DataView dv = new DataView(ds.Tables["ScrTest"]);             
  46. dv.RowFilter="emailid = '" + TextBox1.Text +"'";             
  47. if(dv.Count >0)             
  48. {                 
  49. string lsScript="&lt;script language='javascript'>alert('Exists');</script";                 
  50. Page.RegisterStartupScript("",lsScript);             
  51. }             
  52. else             
  53. {                 
  54. string lsScript="&lt;script language='javascript'>alert('Available');</script";                 
  55. Page.RegisterStartupScript("",lsScript);             
  56. }             
  57. Response.Write("Test");         
  58. }     
  59. }
  60.  
In a webform user have to enter the emailid,
If the entered mailid exists i have displaying the Alert Message,
I have to ask confirmation from the user whether to change the enter mailid or to leave that one without updating,
while doing this the compiler executing the next line Response.Write is Executing,
how to hold the execution till getting the Confirmation(Bu tton Click)
Mar 2 '07 #1
1 1295
latitude
50 New Member
btnAdd.Attribut es.Add in page_load?
Mar 2 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
6293
by: Boris Nikolaevich | last post by:
This is backwards of what I usually want--normally if you have a long-running ASP script, it's a good idea to check to see whether the client is still connected so you can cancel execution. However, I have a script that absolutely MUST finish one it's been started--is there a way to cause the entire script to execute, even if the client disconnects in the middle of the process? It doesn't matter if the script returns anything to the...
2
2046
by: Jenny Zhang | last post by:
Hi, I am running OSDL-DBT3 test against PostgreSQL. I found performance difference between the runs even though the data and queries are the same. I tried to study this problem by getting execution plans at the beginning of each test. The following script gets execution plan for 22 queries, except query 15. i=1 while
6
3611
by: John | last post by:
Hi I have this code as below that first runs a report and then an update query to set a flag so these records are not included in the report next time. Private Sub Command2_Click() DoCmd.OpenReport "MyReport", acViewPreview DoCmd.OpenQuery "MyQuery" End Sub
38
2544
by: vashwath | last post by:
Might be off topic but I don't know where to post this question.Hope some body clears my doubt. The coding standard of the project which I am working on say's not to use malloc.When I asked my lead(I have just started working) he said we should not use dynamic allocation in real time systems, the code will not run in predictable time period.Can anybody tell what does he mean?Why the execution time becomes unpredictable? Thanks
7
3324
by: Pi | last post by:
I have an MDI parent with one or more children forms. Each child form has an engine thread that processes data. The child form's _Closing event is roughly 01 Private Sub frmConvertable_Closing(sender, e 02 'Show the form (other MDI children may be on top 03 Me.Activate( 04 mvarEngineThread.Suspen 05 e.Cancel = MessageBox.Show(strQuitMessage, strQuitTitle, MessageboxButtons.OKCancel) = DialogResult.Cance 06 ...
1
1684
by: Pi | last post by:
I have an MDI parent with one or more children forms. Each child form has an engine thread that processes data. The child form's _Closing event is roughly 01 Private Sub frmConvertable_Closing(sender, e 02 'Show the form (other MDI children may be on top 03 Me.Activate( 04 mvarEngineThread.Suspen 05 e.Cancel = MessageBox.Show(strQuitMessage, strQuitTitle, MessageboxButtons.OKCancel) = DialogResult.Cance 06 ...
17
5060
by: romixnews | last post by:
Hi, I'm facing the problem of analyzing a memory allocation dynamic and object creation dynamics of a very big C++ application with a goal of optimizing its performance and eventually also identifying memory leaks. The application in question is the Mozilla Web Browser. I also have had similar tasks before in the compiler construction area. And it is easy to come up with many more examples, where such kind of statistics can be very...
42
2331
by: Sabiyur | last post by:
Hi all, one of the recent post gives the macro to do swap #define SWAP(m, n) (tmp = (m), (m) = (n), (n) = tmp) This macro will work, if the execution is from left to right. That is step 1) tmp=m step 2) m=n step 3) n=tmp
0
1200
by: sklett | last post by:
I've got a new DGV problem that makes no sense. I need to implement a very simple "row move" operation in a DGV. basically if the user pressed Shift+Up or Shift+Down the selected row and it's previous or following row are swapped. This gives the effect of moving a row up or down. I'm achieving this by swapping the values of a cell (OrderIndex) that the DGV is sorted on. Here is the code: <code> private void...
0
8567
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8398
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5509
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4015
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2529
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1658
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.