|
|
Forums » .NET » ASP.NET »
Posted Date: 06 Jul 2012 Posted By:: sarthi Member Level: Silver Member Rank: 1832 Points: 2
Responses:
3
|
Hi everyone.. in one aspx page i have used messagebox class.. but the control is not going for display of message.. but i getting desired output on to gridview on click of a button.. before that i want to display that message.. wat might be the problem.. please help..
|
Responses
|
#679261 Author: sudhajosyula Member Level: Gold Member Rank: 46 Date: 06/Jul/2012 Rating:  Points: 3 | Hi Sarthi, In web application,we don't have predefined MessageBox method.If it is windows application,we have a predefined MessageBox.If you are using third party control,might be it is possible to create a messagebox in web application.Could you explain us the error and the code you have written in your application here,so that we can find a solution.
| #679263 Author: sarthi Member Level: Silver Member Rank: 1832 Date: 07/Jul/2012 Rating:  Points: 1 | protected void btnAddStudentAccount_Click(object sender, EventArgs e) {
MessageBox m1 = new MessageBox();
string StudentName = TextBox1.Text; string CourseName = TextBox2.Text; string RegNo = TextBox3.Text; string RegDate = TextBox4.Text; string Amount = TextBox5.Text; string Status = TextBox6.Text;
gits g = new gits(); g.addstudentaccount(StudentName, CourseName, RegNo, RegDate, Amount, Status);
m1.Show("Student Record Added Successfuly");
Response.Redirect("ManageStudentAccount.aspx"); } in this code control is going managestudentpage with required result..i hav messagebox class in appcode but line m1.Show is not working.. this is the problem..
public void addstudentaccount(string StudentName, string CourseName, string RegNo, string RegDate, string Amount, string Status) { SqlConnection con = new SqlConnection(str); SqlCommand cmd=new SqlCommand("sp_addstudentaccount",con); cmd.CommandType=CommandType.StoredProcedure; con.Open(); cmd.Parameters.AddWithValue("@StudentName",StudentName); cmd.Parameters.AddWithValue("@CourseName",CourseName); cmd.Parameters.AddWithValue("@RegNo",RegNo); cmd.Parameters.AddWithValue("@RegDate",RegDate); cmd.Parameters.AddWithValue("@Amount",Amount); cmd.Parameters.AddWithValue("@Status",Status); cmd.ExecuteNonQuery(); con.Close(); }
|
|
| Post Reply |
|
|
|
 | | This thread is locked for new responses. Please post your comments and questions as a separate thread. If required, refer to the URL of this page in your new post. |
|
|
|
|
|
Active MembersTodayLast 7 Daysmore... Talk to Webmaster Tony John
|