Click here to Skip to main content
16,004,761 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionConverting from XAML to HTML5 Pin
indian14320-Dec-16 11:24
indian14320-Dec-16 11:24 
AnswerRe: Converting from XAML to HTML5 Pin
koolprasad200320-Dec-16 22:39
professionalkoolprasad200320-Dec-16 22:39 
QuestionError: Server did not recognize the value of HTTP Header SOAPAction Pin
Scott5220-Dec-16 9:24
Scott5220-Dec-16 9:24 
AnswerRe: Error: Server did not recognize the value of HTTP Header SOAPAction Pin
jkirkerx20-Dec-16 10:35
professionaljkirkerx20-Dec-16 10:35 
GeneralRe: Error: Server did not recognize the value of HTTP Header SOAPAction Pin
Scott5221-Dec-16 1:50
Scott5221-Dec-16 1:50 
GeneralRe: Error: Server did not recognize the value of HTTP Header SOAPAction Pin
jkirkerx21-Dec-16 9:18
professionaljkirkerx21-Dec-16 9:18 
GeneralRe: Error: Server did not recognize the value of HTTP Header SOAPAction Pin
Scott5222-Dec-16 1:59
Scott5222-Dec-16 1:59 
QuestionNeed help populating fields from database to form in page load Pin
Bootzilla3320-Dec-16 8:51
Bootzilla3320-Dec-16 8:51 
I am trying to populate the fields on a form from the database and the values aren't populating on the form. I have the value for the where clause hard coded in the code and it doesn't show the values that are in the database for that record on the form:

C#
protected void Page_Load(object sender, EventArgs e)
        {
            this.UnobtrusiveValidationMode = System.Web.UI.UnobtrusiveValidationMode.None;



            {
                labelRID.Text = Request.QueryString["id"];
                
                string rid = labelRID.Text;
                string activityid = labelactivityid.Text;

                if (!IsPostBack)
                {
                    Bindactivitycodedropdown();


                    if (rid != "")
                    {

                        OracleConnection conn = new OracleConnection();
                        OracleCommand cmd = new OracleCommand();
                        conn.ConnectionString = strConnection;
                        conn.Open();

                        cmd.Connection = conn;
                        cmd.CommandText = "Select RID, BUYING_ACTIVITY_ID, CUSTOMER_SOURCE_CODE, CUSTOMER_NAME, CUSTOMER_CITY, CUSTOMER_STATE, CUSTOMER_POSTAL_CODE, BUYING_ACTIVITY_CODE from BUYING_ACTIVITY WHERE RID = '55555'";
                        cmd.Parameters.Add(new OracleParameter("RID", Request.QueryString["ID"]));
                        OracleDataAdapter da = new OracleDataAdapter(cmd);
                        cmd.CommandType = CommandType.Text;
                        OracleDataReader dr = cmd.ExecuteReader();

                        if (dr.Read())
                        {
                            labelRID.Text = dr["rid"].ToString();
                            custname.Text = dr["customer_name"].ToString();
                            custcity.Text = dr["customer_city"].ToString();
                            custstate.Text = dr["customer_state"].ToString();
                            custpostalcode.Text = dr["customer_postal_code"].ToString();
                            activitycode.SelectedItem.Text = dr["buying_activity_code"].ToString();
                            custsrccode.Text = dr["customer_source_code"].ToString();
                            cvactivitycode.Enabled = false;
                            //custname.Text = custstate.SelectedValue.ToString();

                            //if (activitycode.SelectedValue == "0")
                            //{
                            //    custname.Text = "";
                            //    custcity.Text = "";
                            //    custpostalcode.Text = "";
                            //}
                            dr.Close();
                            conn.Close();
                        }
                        else
                        {

                            labelRID.Text = "";
                            custname.Text = "";
                            custcity.Text = "";
                            custstate.Text = "";
                            custpostalcode.Text = "";
                            activitycode.SelectedItem.Text = "";
                            custsrccode.Text = "C812 - NASA";

                        }
                    }
                }
            }
        }

AnswerRe: Need help populating fields from database to form in page load Pin
Richard Deeming20-Dec-16 10:18
mveRichard Deeming20-Dec-16 10:18 
QuestionViewData, Viewbag and tempdata not working Pin
Member 815484520-Dec-16 6:47
Member 815484520-Dec-16 6:47 
AnswerRe: ViewData, Viewbag and tempdata not working Pin
Richard Deeming20-Dec-16 8:09
mveRichard Deeming20-Dec-16 8:09 
GeneralRe: ViewData, Viewbag and tempdata not working Pin
Member 815484520-Dec-16 8:36
Member 815484520-Dec-16 8:36 
GeneralRe: ViewData, Viewbag and tempdata not working Pin
Richard Deeming20-Dec-16 10:11
mveRichard Deeming20-Dec-16 10:11 
QuestionASMX: Facing problem to send user credentails from client side to service end Pin
Tridip Bhattacharjee19-Dec-16 3:51
professionalTridip Bhattacharjee19-Dec-16 3:51 
AnswerRe: ASMX: Facing problem to send user credentails from client side to service end Pin
jkirkerx19-Dec-16 11:40
professionaljkirkerx19-Dec-16 11:40 
GeneralRe: ASMX: Facing problem to send user credentails from client side to service end Pin
Tridip Bhattacharjee20-Dec-16 21:17
professionalTridip Bhattacharjee20-Dec-16 21:17 
AnswerRe: ASMX: Facing problem to send user credentails from client side to service end Pin
jkirkerx21-Dec-16 9:49
professionaljkirkerx21-Dec-16 9:49 
GeneralRe: ASMX: Facing problem to send user credentails from client side to service end Pin
Tridip Bhattacharjee21-Dec-16 20:31
professionalTridip Bhattacharjee21-Dec-16 20:31 
GeneralRe: ASMX: Facing problem to send user credentails from client side to service end Pin
jkirkerx22-Dec-16 8:20
professionaljkirkerx22-Dec-16 8:20 
GeneralRe: ASMX: Facing problem to send user credentails from client side to service end Pin
Tridip Bhattacharjee22-Dec-16 21:28
professionalTridip Bhattacharjee22-Dec-16 21:28 
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 

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.