473,486 Members | 2,117 Online
Bytes | Software Development & Data Engineering Community
Create 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(Button Click)
Mar 2 '07 #1
1 1281
latitude
50 New Member
btnAdd.Attributes.Add in page_load?
Mar 2 '07 #2

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

Similar topics

5
6288
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. ...
2
2025
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...
6
3595
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()...
38
2520
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...
7
3306
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...
1
1674
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...
17
5023
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...
42
2303
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)...
0
1190
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...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7126
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,...
0
5434
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,...
1
4865
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...
0
4559
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...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1378
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 ...
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
262
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.