Click here to Skip to main content
       

ASP.NET

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
Questionduplicate insert for no reason!memberJassim Rahma27 Nov '12 - 10:29 
let me first show the code. here is the insert code:
 
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:
 
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.0memberSuper_Developer26 Nov '12 - 19:41 
Hello,
 
I'm developing as ASP.NET web application and I use Crystal report for visual studio 2010, I installed it on my machine.
the application work correctly on my machine, but not like this on the server.
after I upload it to the server I fond this error
 
Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
 
I searched for "log4net" more and I found more releases
I upload it ot my bin folder on the server, but the error changed to:
 
Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
 
I didn't found any compatible assembly to my application,
 
I developed this web application into 32 bit OS, and I upload it to a server machine which use Window server 2008 R2 64 bit OS
 
is it has relation with the error?
and How can I correct that error?
at last where I can fount the compatible assembly log4net version 1.2.10.0?
 
thanks?
QuestionCould not load file or assembly 'log4net, Version=1.2.10.0memberSuper_Developer26 Nov '12 - 19:38 
Hello,
 
I'm developing as ASP.NET web application and I use Crystal report for visual studio 2010, I installed it on my machine.
the application work correctly on my machine, but not like this on the server.
after I upload it to the server I fond this error
 
Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
 
I searched for "log4net" more and I found more releases
I upload it ot my bin folder on the server, but the error changed to:
 
Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
 
I didn't found any compatible assembly to my application,
 
I developed this web application into 32 bit OS, and I upload it to a server machine which use Window server 2008 R2 64 bit OS
 
is it has relation with the error?
and How can I correct that error?
at last where I can fount the compatible assembly log4net version 1.2.10.0?
 
thanks?
AnswerRe: Could not load file or assembly 'log4net, Version=1.2.10.0memberAli Al Omairi(Abu AlHassan)26 Nov '12 - 20:58 
Sir;
I don't understand. Did you upload a diffident version of the assembly than the one you use it in development?
 
if so,, then just copy the one from you development machine assembly cache and upload it to the server.
Help people,so poeple can help you.

GeneralRe: Could not load file or assembly 'log4net, Version=1.2.10.0memberSuper_Developer26 Nov '12 - 23:38 
thanks fro your reply
 
My Application work on the local host without this assembly, but fire an error on the server, this error say:
 
Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
 
I downloaded the assembly from the internet and upload it to the server, then another error say:
 
Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
 
how can I solve this error and where I found the compatible assembly log4net version 1.2.10.0?
GeneralRe: Could not load file or assembly 'log4net, Version=1.2.10.0memberAli Al Omairi(Abu AlHassan)26 Nov '12 - 23:54 
Man;
On your local machine the assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' runs from the Global Assembly Cache[^].
 
You should copy it and upload it to the server.
 
Good Luck Smile | :)
Help people,so poeple can help you.

GeneralRe: Could not load file or assembly 'log4net, Version=1.2.10.0memberSuper_Developer27 Nov '12 - 0:31 
Many thank,
 
I will try it
QuestionASP.NET usefull controlsmemberYoyosch26 Nov '12 - 19:10 
I am going to develop application in ASP.NET MVC. I know there are no rich controls.
 
Could you please recommend me good controls for that (datagrid, calendar, scheduler, numeric textbox, etc.)?
 
Thanks in advance
AnswerRe: ASP.NET usefull controlsmemberbatterybuying27 Nov '12 - 2:38 
Wink | ;) Free no good
GeneralRe: ASP.NET usefull controlsmembergilvani29 Nov '12 - 4:37 
Free and good controls are the jquery ui controls Big Grin | :-D

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


Advertise | Privacy | Mobile
Web04 | 2.6.130523.1 | Last Updated 25 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid