Click here to Skip to main content
15,887,596 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionhttpModule Type Language Module will not load in Visual Studio debugger Pin
Raimundo2a27-Nov-12 22:50
Raimundo2a27-Nov-12 22:50 
AnswerRe: httpModule Type Language Module will not load in Visual Studio debugger Pin
Richard MacCutchan28-Nov-12 0:10
mveRichard MacCutchan28-Nov-12 0:10 
GeneralRe: httpModule Type Language Module will not load in Visual Studio debugger Pin
Raimundo2a28-Nov-12 4:16
Raimundo2a28-Nov-12 4:16 
QuestionException: System.ServiceModel.ProtocolException: The content type text/html of the response message does not match the content type of the binding (text/xml; charset=utf-8) Pin
indian14327-Nov-12 13:35
indian14327-Nov-12 13:35 
AnswerRe: Exception: System.ServiceModel.ProtocolException: The content type text/html of the response message does not match the content type of the binding (text/xml; charset=utf-8) Pin
jkirkerx28-Nov-12 16:55
professionaljkirkerx28-Nov-12 16:55 
GeneralRe: Exception: System.ServiceModel.ProtocolException: The content type text/html of the response message does not match the content type of the binding (text/xml; charset=utf-8) Pin
indian14329-Nov-12 7:46
indian14329-Nov-12 7:46 
GeneralRe: Exception: System.ServiceModel.ProtocolException: The content type text/html of the response message does not match the content type of the binding (text/xml; charset=utf-8) Pin
jkirkerx29-Nov-12 10:02
professionaljkirkerx29-Nov-12 10:02 
Questionduplicate insert for no reason! Pin
Jassim Rahma27-Nov-12 10:29
Jassim Rahma27-Nov-12 10:29 
let me first show the code. here is the insert code:

C#
try
{
    sql_connection = new MySqlConnection(ConfigurationManager.ConnectionStrings["SQLdb"].ConnectionString);
    sql_connection.Open();
    sql_command = new MySqlCommand("sp_add_support_ticket", sql_connection);
    sql_command.CommandType = CommandType.StoredProcedure;

    sql_command.Parameters.AddWithValue("param_support_incident_title", txtSubject.Text);
    sql_command.Parameters.AddWithValue("param_email_address", txtEmailAddress.Text);
    sql_command.Parameters.AddWithValue("param_support_ticket_description", txtMessage.XHTML);

    int result_rows = sql_command.ExecuteNonQuery();

    Session["message_title"] = "Thank you";
    Session["message_title_Color"] = Color.Blue.ToArgb();
    Session["message_text"] = "We have recieved your feedback and we will get back to you as soon as possible.";
    Session["message_button_title"] = "Back";
    Session["message_button_url"] = "Home.aspx";

    Response.Redirect("Message.aspx", false);
}
catch (Exception exp)
{
    Session["message_title"] = "Error";
    Session["message_title_Color"] = Color.Red.ToArgb();
    Session["message_text"] = "Unable to send your message. Please try again later.";
    Session["message_button_title"] = "Back";
    Session["message_button_url"] = Request.UrlReferrer.ToString();

    Response.Redirect("Message.aspx", false);
}
finally
{
    if (sql_connection != null)
    {
        if (sql_connection.State == ConnectionState.Open)
            sql_connection.Close();
    }
}


and this is my stored procedure:

SQL
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_add_support_ticket`(IN `param_support_incident_title` varchar(255),IN `param_email_address` varchar(255),IN `param_support_ticket_description` text)
BEGIN
	INSERT INTO support_incidents (support_incident_title, email_address) VALUES (param_support_incident_title, param_email_address);
	INSERT INTO support_tickets (support_incident_id, support_ticket_description) VALUES (LAST_INSERT_ID(), param_support_ticket_description);
END


now.... when I fill the form on help.aspx page i get the data insert properly..

BUT...............

It will also add a new row

in support_incodents table with "Thank you" in support_incident_title field

in support_tickets table with "We have recieved your feedback and we will get back to you as soon as possible." in support_ticket_description field


if you notice, the text added in the new row is taken from the Session variable! but I really don't understand why it's adding new row and how it's taking Session's variable?!!

please help..............


Technology News @ http://www.JassimRahma.com

QuestionError: Could not load file or assembly 'log4net, Version=1.2.10.0 Pin
Super_Developer26-Nov-12 19:41
Super_Developer26-Nov-12 19:41 
QuestionCould not load file or assembly 'log4net, Version=1.2.10.0 Pin
Super_Developer26-Nov-12 19:38
Super_Developer26-Nov-12 19:38 
AnswerRe: Could not load file or assembly 'log4net, Version=1.2.10.0 Pin
Ali Al Omairi(Abu AlHassan)26-Nov-12 20:58
professionalAli Al Omairi(Abu AlHassan)26-Nov-12 20:58 
GeneralRe: Could not load file or assembly 'log4net, Version=1.2.10.0 Pin
Super_Developer26-Nov-12 23:38
Super_Developer26-Nov-12 23:38 
GeneralRe: Could not load file or assembly 'log4net, Version=1.2.10.0 Pin
Ali Al Omairi(Abu AlHassan)26-Nov-12 23:54
professionalAli Al Omairi(Abu AlHassan)26-Nov-12 23:54 
GeneralRe: Could not load file or assembly 'log4net, Version=1.2.10.0 Pin
Super_Developer27-Nov-12 0:31
Super_Developer27-Nov-12 0:31 
QuestionASP.NET usefull controls Pin
Yoyosch26-Nov-12 19:10
Yoyosch26-Nov-12 19:10 
AnswerRe: ASP.NET usefull controls Pin
batterybuying27-Nov-12 2:38
batterybuying27-Nov-12 2:38 
GeneralRe: ASP.NET usefull controls Pin
gilvani29-Nov-12 4:37
gilvani29-Nov-12 4:37 
AnswerRe: ASP.NET usefull controls Pin
D Waller8-Dec-12 1:43
D Waller8-Dec-12 1:43 
QuestionASP MVC update panel Pin
Yoyosch26-Nov-12 19:04
Yoyosch26-Nov-12 19:04 
AnswerRe: ASP MVC update panel Pin
gilvani28-Nov-12 2:48
gilvani28-Nov-12 2:48 
AnswerRe: ASP MVC update panel Pin
Mayank_Gupta_28-Nov-12 15:23
professionalMayank_Gupta_28-Nov-12 15:23 
SuggestionIf we click DropDownList items Automatically Select Second DropdownLIst in gridview? Pin
hemanth sutapalli26-Nov-12 0:44
hemanth sutapalli26-Nov-12 0:44 
GeneralRe: If we click DropDownList items Automatically Select Second DropdownLIst in gridview? Pin
Ali Al Omairi(Abu AlHassan)26-Nov-12 19:21
professionalAli Al Omairi(Abu AlHassan)26-Nov-12 19:21 
GeneralRe: If we click DropDownList items Automatically Select Second DropdownLIst in gridview? Pin
Robert Bettinelli3-Dec-12 15:25
Robert Bettinelli3-Dec-12 15:25 
QuestionYahoo Wweather: XMLDOCUMENT, XPATHDOCUMENT or ... Pin
Jassim Rahma25-Nov-12 23:12
Jassim Rahma25-Nov-12 23:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.