Click here to Skip to main content
15,888,610 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: ASMX: Facing problem to send user credentails from client side to service end Pin
jkirkerx23-Dec-16 7:02
professionaljkirkerx23-Dec-16 7:02 
QuestionASMX Web Service Soap Extension ProcessMessage function not calling Pin
Tridip Bhattacharjee19-Dec-16 2:09
professionalTridip Bhattacharjee19-Dec-16 2:09 
AnswerRe: ASMX Web Service Soap Extension ProcessMessage function not calling Pin
Tridip Bhattacharjee21-Dec-16 20:32
professionalTridip Bhattacharjee21-Dec-16 20:32 
Questionasp .net web development Pin
Sanju govind18-Dec-16 20:53
Sanju govind18-Dec-16 20:53 
AnswerRe: asp .net web development Pin
Peter Leow18-Dec-16 21:02
professionalPeter Leow18-Dec-16 21:02 
QuestionRe: asp .net web development Pin
ZurdoDev19-Dec-16 8:23
professionalZurdoDev19-Dec-16 8:23 
AnswerRe: asp .net web development Pin
koolprasad200320-Dec-16 22:43
professionalkoolprasad200320-Dec-16 22:43 
QuestionNeed help on passing id to next page on response.redirect Pin
Bootzilla3318-Dec-16 10:43
Bootzilla3318-Dec-16 10:43 
I am inserting into the database and want to pass the id to the next page via response.redirect but am not sure how to do that.

Here is the code I have:

C#
 string custsrc = custsrccode.Text;            
            string name = custname.Text;
            string city = custcity.Text;
            string state = custstate.Text;
            string postcode = custpostalcode.Text;
            string actcode = activitycode.SelectedItem.Text;
            string id = labelID.Text;
            string activityid = labelactivityid.Text;

  OracleConnection conn = new OracleConnection();  // C#
                conn.ConnectionString = strConnection;
                conn.Open();

                OracleCommand cmd = new OracleCommand();
                cmd.Connection = conn;
                cmd.CommandText = "INSERT INTO BUYING_ACTIVITY (CUSTOMER_SOURCE_CODE, CUSTOMER_NAME, CUSTOMER_CITY, CUSTOMER_STATE, CUSTOMER_POSTAL_CODE, BUYING_ACTIVITY_CODE, ID) " +
                "VALUES (:custsrc, :name, :city, :state, :postcode, :actcode, :id)";


                cmd.Parameters.Add(new OracleParameter("custsrc", custsrc));
                cmd.Parameters.Add(new OracleParameter("name", name));
                cmd.Parameters.Add(new OracleParameter("city", city));
                cmd.Parameters.Add(new OracleParameter("state", state));
                cmd.Parameters.Add(new OracleParameter("postcode", postcode));
                cmd.Parameters.Add(new OracleParameter("actcode", actcode));
                cmd.Parameters.Add(new OracleParameter("id", id));

                cmd.ExecuteNonQuery();
                
                conn.Close();

Response.Redirect("contractinfo.aspx?Id=" + labelRID.Text);


I get nothing on the labelID.Text when I step thru my code and then when it goes to the next page I obviously get nothing as well contractinfo.aspx?Id="" where the "" should be the id value. How do I fix this with the code I have.
AnswerRe: Need help on passing id to next page on response.redirect Pin
F-ES Sitecore18-Dec-16 21:59
professionalF-ES Sitecore18-Dec-16 21:59 
QuestionData not updating on fields using UPDATE Statement Pin
Bootzilla3318-Dec-16 10:41
Bootzilla3318-Dec-16 10:41 
AnswerRe: Data not updating on fields using UPDATE Statement Pin
Richard Deeming19-Dec-16 2:33
mveRichard Deeming19-Dec-16 2:33 
GeneralRe: Data not updating on fields using UPDATE Statement Pin
Bootzilla3319-Dec-16 8:21
Bootzilla3319-Dec-16 8:21 
AnswerRe: Data not updating on fields using UPDATE Statement Pin
ZurdoDev19-Dec-16 8:25
professionalZurdoDev19-Dec-16 8:25 
QuestionDropdown pre-filled from prior page fires off required validator Pin
Bootzilla3315-Dec-16 9:54
Bootzilla3315-Dec-16 9:54 
AnswerRe: Dropdown pre-filled from prior page fires off required validator Pin
Richard Deeming16-Dec-16 2:05
mveRichard Deeming16-Dec-16 2:05 
GeneralRe: Dropdown pre-filled from prior page fires off required validator Pin
Bootzilla3316-Dec-16 6:49
Bootzilla3316-Dec-16 6:49 
GeneralRe: Dropdown pre-filled from prior page fires off required validator Pin
Richard Deeming16-Dec-16 9:54
mveRichard Deeming16-Dec-16 9:54 
GeneralRe: Dropdown pre-filled from prior page fires off required validator Pin
Bootzilla3316-Dec-16 17:15
Bootzilla3316-Dec-16 17:15 
GeneralRe: Dropdown pre-filled from prior page fires off required validator Pin
Richard Deeming19-Dec-16 1:58
mveRichard Deeming19-Dec-16 1:58 
QuestionNon-invocable member 'System.Web.UI.WebControls.ListControl.Items' cannot be used like a method error. Pin
Bootzilla3315-Dec-16 9:45
Bootzilla3315-Dec-16 9:45 
AnswerRe: Non-invocable member 'System.Web.UI.WebControls.ListControl.Items' cannot be used like a method error. Pin
Michael_Davies15-Dec-16 10:10
Michael_Davies15-Dec-16 10:10 
AnswerRe: Non-invocable member 'System.Web.UI.WebControls.ListControl.Items' cannot be used like a method error. Pin
ZurdoDev15-Dec-16 10:28
professionalZurdoDev15-Dec-16 10:28 
AnswerRe: Non-invocable member 'System.Web.UI.WebControls.ListControl.Items' cannot be used like a method error. Pin
Afzaal Ahmad Zeeshan15-Dec-16 11:48
professionalAfzaal Ahmad Zeeshan15-Dec-16 11:48 
QuestionJavascript Book(s) Pin
Patrick Rogers15-Dec-16 6:29
Patrick Rogers15-Dec-16 6:29 
AnswerRe: Javascript Book(s) Pin
Richard MacCutchan15-Dec-16 6:42
mveRichard MacCutchan15-Dec-16 6:42 

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.