Cant Render Page Control with Visual Studio 2005 Beta

Discussion in 'ASP .Net Web Controls' started by ebo beecham via .NET 247, Apr 9, 2005.

  1. Wrote some code with VStudio Professional 2003.
    Worked perfectly until I installed VStudi 2005 Beta.
    Now it gives me this error Message:

    Stack Trace:
    [HttpException (0x80004005): Request is not available in this context]
    System.Web.UI.Page.get_Request() +3137059
    System.Web.UI.HtmlControls.HtmlForm.RenderAttributes(HtmlTextWriter writer) +491
    System.Web.UI.HtmlControls.HtmlControl.RenderBeginTag(HtmlTextWriter writer) +33
    System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +55
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +23
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +139
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +24
    System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +91
    System.Web.UI.Page.Render(HtmlTextWriter writer) +25
    PageFactory.CommunityData.CreatePageControls() +6356
    PageFactory.AddCommunities.WritePageContents() +40
    PageFactory.NovellaScreen.Display() +85
    SwitchBoard.RequestHandler.ProcessRequest(HttpContext context) +12716
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +186
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69


    THIS IS THE CODE:
    public virtual void CreatePageControls()
    {
    HttpContext.Current.Response.Write("");
    HttpContext.Current.Response.End();

    OleDbConnection objConn = new OleDbConnection(PageFactory.ConnectionString.dblocation() );
    OleDbConnection objConnII = new OleDbConnection(PageFactory.ConnectionString.dblocation() );
    OleDbConnection objConnIII = new OleDbConnection(PageFactory.ConnectionString.dblocation() );
    OleDbConnection objConnIV = new OleDbConnection(PageFactory.ConnectionString.dblocation() );
    objConn.Open();
    objConnII.Open();
    objConnIII.Open();
    objConnIV.Open();

    OleDbCommand objDistrictCommand = new OleDbCommand();
    OleDbCommand objEndemicityCommand = new OleDbCommand();
    OleDbCommand objCommunityStatusCommand = new OleDbCommand();
    OleDbCommand objFocalPersonCommand = new OleDbCommand();
    OleDbDataReader objDistricts ;
    OleDbDataReader objEndemicity ;
    OleDbDataReader objCommunityStatus ;
    OleDbDataReader objFocalPerson ;

    string strDistricts = " SELECT " ;
    strDistricts += " DistrictID,DistrictName,RegionName " ;
    strDistricts += " FROM Districts,Regions " ;
    strDistricts += " WHERE Districts.RegionID = Regions.RegionID " ;
    strDistricts += " ORDER BY DistrictID " ;

    objDistrictCommand.CommandText = strDistricts;
    objDistrictCommand.Connection = objConn;
    objDistricts = objDistrictCommand.ExecuteReader();

    string strEndemicity = " SELECT * " ;
    strEndemicity += " FROM Endemicity " ;
    strEndemicity += " ORDER BY EndemicityID " ;

    objEndemicityCommand.CommandText = strEndemicity;
    objEndemicityCommand.Connection = objConnII;
    objEndemicity = objEndemicityCommand.ExecuteReader();

    string strCommunityStatus = " SELECT * " ;
    strCommunityStatus += " FROM CommunityStatus " ;
    strCommunityStatus += " ORDER BY CommunityStatusID " ;

    objCommunityStatusCommand.CommandText = strCommunityStatus;
    objCommunityStatusCommand.Connection = objConnIII;
    objCommunityStatus = objCommunityStatusCommand.ExecuteReader();

    string strFocalPerson = " SELECT CommunityContact, CommunityContactID " ;
    strFocalPerson += " FROM CommunityContacts " ;
    strFocalPerson += " WHERE CommunityID = " + this.CommunityID ;
    strFocalPerson += " ORDER BY CommunityContactID " ;

    objFocalPersonCommand.CommandText = strFocalPerson;
    objFocalPersonCommand.Connection = objConnIV;
    objFocalPerson = objFocalPersonCommand.ExecuteReader();

    EditCommunityDataForm.ID = "EditCommunityDataForm";

    CommunityIDTextBox.ID = "CommunityID";
    CommunityIDTextBox.Attributes["name"] = "CommunityID";
    CommunityIDTextBox.Attributes["style"] = "position:absolute; left:450; top:30;display:none;";
    CommunityIDTextBox.CssClass = "LinenInputStyle";
    CommunityIDTextBox.Visible = true;
    CommunityIDTextBox.Text = this.CommunityID.ToString();

    EditCommunityDataForm.Controls.Add(CommunityIDTextBox);

    LastModifiedDateTextBox.ID = "LastModifiedDate";
    LastModifiedDateTextBox.Attributes["name"] = "LastModifiedDate";
    LastModifiedDateTextBox.Attributes["style"] = "position:absolute; left:450; top:50;display:none;";
    LastModifiedDateTextBox.CssClass = "LinenInputStyle";
    LastModifiedDateTextBox.Visible = true;
    LastModifiedDateTextBox.Text = this.LastModifiedDate.ToString();
    EditCommunityDataForm.Controls.Add(LastModifiedDateTextBox);

    lblInstructions.Attributes["style"] = "position:absolute; left:5; top:10;background-Color:#c0c0c0;border:1px solid #000000;";
    if (this is PageFactory.AddCommunities)
    {
    lblInstructions.Text = "Please enter the details of the new community in the appropriate fields";
    }
    else
    {
    lblInstructions.Text = "To edit any of the details of this Community please modify the values in the appropriate fields";
    }
    lblInstructions.CssClass = "NiceSmallDetails";
    EditCommunityDataForm.Controls.Add(lblInstructions);

    lblCommunityName.Attributes["style"] = "position:absolute; left:5; top:35;";
    lblCommunityName.Text = "Community Name";
    lblCommunityName.CssClass = "NiceSmallDetails";
    EditCommunityDataForm.Controls.Add(lblCommunityName);

    txtCommunityName.ID = "CommunityName";
    txtCommunityName.Attributes["name"] = "CommunityName";
    txtCommunityName.Attributes["OnKeyDown"] = "GetDate()";
    txtCommunityName.Attributes["style"] = "position:absolute; left:150; top:30;";
    txtCommunityName.CssClass = "LinenInputStyle";
    txtCommunityName.Text = this.CommunityName;
    EditCommunityDataForm.Controls.Add(txtCommunityName);

    lblDistrict.Attributes["style"] = "position:absolute; left:5; top:60;";
    lblDistrict.Text = "District";
    lblDistrict.CssClass = "NiceSmallDetails";
    EditCommunityDataForm.Controls.Add(lblDistrict);

    lstDistrict.ID = "DistrictID";
    lstDistrict.Attributes["name"] = "DistrictID";
    lstDistrict.Attributes["style"] = "position:absolute; left:150; top:55;border solid 1px;";
    lstDistrict.CssClass = "LinenInputStyle";
    lstDistrict.DataSource = objDistricts;
    lstDistrict.DataValueField = "DistrictID";
    lstDistrict.DataTextField = "DistrictName";
    lstDistrict.DataBind();
    lstDistrict.SelectedIndex = this.mDistrictID - 1;
    EditCommunityDataForm.Controls.Add(lstDistrict);

    lblFocalPerson.Attributes["style"] = "position:absolute; left:5; top:83;";
    lblFocalPerson.Text = "Focal Person";
    lblFocalPerson.CssClass = "NiceSmallDetails";
    EditCommunityDataForm.Controls.Add(lblFocalPerson);

    lstFocalPerson.ID = "FocalPersonID";
    lstFocalPerson.Attributes["name"] = "FocalPersonID";
    lstFocalPerson.Attributes["style"] = "position:absolute; left:150; top:78;border solid 1px;";
    lstFocalPerson.CssClass = "LinenInputStyle";
    lstFocalPerson.DataSource = objFocalPerson;
    lstFocalPerson.DataValueField = "CommunityContactID";
    lstFocalPerson.DataTextField = "CommunityContact";
    lstFocalPerson.DataBind();

    try
    {
    lstFocalPerson.SelectedValue = this.mFocalPersonID.ToString();
    }
    catch
    {
    }

    EditCommunityDataForm.Controls.Add(lstFocalPerson);

    lblLongitude.Attributes["style"] = "position:absolute; left:5; top:107;";
    lblLongitude.Text = "Longitude";
    lblLongitude.CssClass = "NiceSmallDetails";
    EditCommunityDataForm.Controls.Add(lblLongitude);

    txtLongitude.ID = "Longitude";
    txtLongitude.Attributes["name"] = "Longitude";
    txtLongitude.Attributes["style"] = "position:absolute; left:150; top:102;";
    txtLongitude.CssClass = "LinenInputStyle";
    txtLongitude.Text = this.Longitude;
    EditCommunityDataForm.Controls.Add(txtLongitude);

    lblLatitude.Attributes["style"] = "position:absolute; left:5; top:130;";
    lblLatitude.Text = "Latitude";
    lblLatitude.CssClass = "NiceSmallDetails";
    EditCommunityDataForm.Controls.Add(lblLatitude);

    txtLatitude.ID = "Latitude";
    txtLatitude.Attributes["name"] = "Latitude";
    txtLatitude.Attributes["style"] = "position:absolute; left:150; top:127;";
    txtLatitude.CssClass = "LinenInputStyle";
    txtLatitude.Text = this.Latitude;
    EditCommunityDataForm.Controls.Add(txtLatitude);

    lblEndemicity.Attributes["style"] = "position:absolute; left:5; top:153;";
    lblEndemicity.Text = "Endemicity";
    lblEndemicity.CssClass = "NiceSmallDetails";
    EditCommunityDataForm.Controls.Add(lblEndemicity);

    lstEndemicity.ID = "EndemicityID";
    lstEndemicity.Attributes["name"] = "EndemicityID";
    lstEndemicity.Attributes["style"] = "position:absolute; left:150; top:152;border solid 1px;";
    lstEndemicity.CssClass = "LinenInputStyle";
    lstEndemicity.DataSource = objEndemicity;
    lstEndemicity.DataValueField = "EndemicityID";
    lstEndemicity.DataTextField = "Endemicity";
    lstEndemicity.DataBind();
    lstEndemicity.SelectedIndex = this.mEndemicityID - 1;
    EditCommunityDataForm.Controls.Add(lstEndemicity);

    lblEstimatedTrees.Attributes["style"] = "position:absolute; left:5; top:176;";
    lblEstimatedTrees.Text = "Estimated Trees";
    lblEstimatedTrees.CssClass = "NiceSmallDetails";
    EditCommunityDataForm.Controls.Add(lblEstimatedTrees);

    txtEstimatedTrees.ID = "EstimatedTrees";
    txtEstimatedTrees.Attributes["name"] = "EstimatedTrees";
    txtEstimatedTrees.Attributes["onblur"] = "Monetize()";
    txtEstimatedTrees.Attributes["onkeydown"] = "ValidateNumeric()";
    txtEstimatedTrees.Attributes["style"] = "position:absolute; left:150; top:174;";
    txtEstimatedTrees.CssClass = "LinenInputStyle";
    txtEstimatedTrees.Text = this.mEstimatedTrees.ToString();
    EditCommunityDataForm.Controls.Add(txtEstimatedTrees);

    lblEstimatedYield.Attributes["style"] = "position:absolute; left:5; top:202;";
    lblEstimatedYield.Text = "Estimated Yield";
    lblEstimatedYield.CssClass = "NiceSmallDetails";
    EditCommunityDataForm.Controls.Add(lblEstimatedYield);

    txtEstimatedYield.ID = "EstimatedYield";
    txtEstimatedYield.Attributes["name"] = "EstimatedYield";
    txtEstimatedYield.Attributes["onblur"] = "Monetize()";
    txtEstimatedYield.Attributes["onkeydown"] = "ValidateNumeric()";
    txtEstimatedYield.Attributes["style"] = "position:absolute; left:150; top:199;";
    txtEstimatedYield.CssClass = "LinenInputStyle";
    txtEstimatedYield.Text = this.mEstimatedYield.ToString("#,##0.00;(#,##0.00);0");

    EditCommunityDataForm.Controls.Add(txtEstimatedYield);

    lblCommunityStatus.Attributes["style"] = "position:absolute; left:5; top:225;";
    lblCommunityStatus.Text = "Community Status";
    lblCommunityStatus.CssClass = "NiceSmallDetails";
    EditCommunityDataForm.Controls.Add(lblCommunityStatus);

    lstCommunityStatus.ID = "CommunityStatusID";
    lstCommunityStatus.Attributes["name"] = "CommunityStatusID";
    lstCommunityStatus.Attributes["style"] = "position:absolute; left:150; top:224;border solid 1px;";
    lstCommunityStatus.CssClass = "LinenInputStyle";
    lstCommunityStatus.DataSource = objCommunityStatus;
    lstCommunityStatus.DataValueField = "CommunityStatusID";
    lstCommunityStatus.DataTextField = "CommunityStatus";
    lstCommunityStatus.DataBind();
    lstCommunityStatus.SelectedIndex = this.mCommunityStatusID - 1;
    EditCommunityDataForm.Controls.Add(lstCommunityStatus);

    SaveButton.ID = "SaveButton";
    SaveButton.Attributes["name"] = SaveButton.UniqueID ;
    SaveButton.Attributes["OnClick"] = "EditCommunityDataForm.Submit()";
    if (this is PageFactory.AddCommunities)
    {
    SaveButton.Value = "Create Community";
    }
    else
    {
    SaveButton.Value = "Save Community Details";
    }
    SaveButton.Attributes["style"] = "position:absolute; left:150; top:300;width:170;";
    EditCommunityDataForm.Controls.Add(SaveButton);

    Page.Controls.Add(EditCommunityDataForm);

    Render(base.CreateHtmlTextWriter(HttpContext.Current.Response.Output));

    objConn.Close();
    objConnII.Close();
    objConnIII.Close();
    }

    -----------------------
    Posted by a user from .NET 247 (http://www.dotnet247.com/)

    <Id>Zxfe8Q2jB0SUEnYJEjno2A==</Id>
    ebo beecham via .NET 247, Apr 9, 2005
    #1
    1. Advertising

  2. The beta probably set the older site to use ASP.NET 2.0 beta. Try using this
    tool to set the older site back to 1.1:

    http://www.denisbauer.com/NETTools/ASPNETVersionSwitcher.aspx

    "ebo beecham via .NET 247" <> wrote in message
    news:...
    > Wrote some code with VStudio Professional 2003.
    > Worked perfectly until I installed VStudi 2005 Beta.
    > Now it gives me this error Message:
    >
    > Stack Trace:
    > [HttpException (0x80004005): Request is not available in this context]
    > System.Web.UI.Page.get_Request() +3137059
    > System.Web.UI.HtmlControls.HtmlForm.RenderAttributes(HtmlTextWriter
    > writer) +491
    > System.Web.UI.HtmlControls.HtmlControl.RenderBeginTag(HtmlTextWriter
    > writer) +33
    > System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +55
    > System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,
    > ControlAdapter adapter) +23
    > System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
    > ControlAdapter adapter) +139
    > System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +24
    > System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +91
    > System.Web.UI.Page.Render(HtmlTextWriter writer) +25
    > PageFactory.CommunityData.CreatePageControls() +6356
    > PageFactory.AddCommunities.WritePageContents() +40
    > PageFactory.NovellaScreen.Display() +85
    > SwitchBoard.RequestHandler.ProcessRequest(HttpContext context) +12716
    >
    > System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
    > +186
    > System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
    > completedSynchronously) +69
    >
    >
    > THIS IS THE CODE:
    > public virtual void CreatePageControls()
    > {
    > HttpContext.Current.Response.Write("");
    > HttpContext.Current.Response.End();
    >
    > OleDbConnection objConn = new
    > OleDbConnection(PageFactory.ConnectionString.dblocation() );
    > OleDbConnection objConnII = new
    > OleDbConnection(PageFactory.ConnectionString.dblocation() );
    > OleDbConnection objConnIII = new
    > OleDbConnection(PageFactory.ConnectionString.dblocation() );
    > OleDbConnection objConnIV = new
    > OleDbConnection(PageFactory.ConnectionString.dblocation() );
    > objConn.Open();
    > objConnII.Open();
    > objConnIII.Open();
    > objConnIV.Open();
    >
    > OleDbCommand objDistrictCommand = new OleDbCommand();
    > OleDbCommand objEndemicityCommand = new OleDbCommand();
    > OleDbCommand objCommunityStatusCommand = new OleDbCommand();
    > OleDbCommand objFocalPersonCommand = new OleDbCommand();
    > OleDbDataReader objDistricts ;
    > OleDbDataReader objEndemicity ;
    > OleDbDataReader objCommunityStatus ;
    > OleDbDataReader objFocalPerson ;
    >
    > string strDistricts = " SELECT " ;
    > strDistricts += " DistrictID,DistrictName,RegionName " ;
    > strDistricts += " FROM Districts,Regions " ;
    > strDistricts += " WHERE Districts.RegionID = Regions.RegionID " ;
    > strDistricts += " ORDER BY DistrictID " ;
    >
    > objDistrictCommand.CommandText = strDistricts;
    > objDistrictCommand.Connection = objConn;
    > objDistricts = objDistrictCommand.ExecuteReader();
    >
    > string strEndemicity = " SELECT * " ;
    > strEndemicity += " FROM Endemicity " ;
    > strEndemicity += " ORDER BY EndemicityID " ;
    >
    > objEndemicityCommand.CommandText = strEndemicity;
    > objEndemicityCommand.Connection = objConnII;
    > objEndemicity = objEndemicityCommand.ExecuteReader();
    >
    > string strCommunityStatus = " SELECT * " ;
    > strCommunityStatus += " FROM CommunityStatus " ;
    > strCommunityStatus += " ORDER BY CommunityStatusID " ;
    >
    > objCommunityStatusCommand.CommandText = strCommunityStatus;
    > objCommunityStatusCommand.Connection = objConnIII;
    > objCommunityStatus = objCommunityStatusCommand.ExecuteReader();
    >
    > string strFocalPerson = " SELECT CommunityContact, CommunityContactID " ;
    > strFocalPerson += " FROM CommunityContacts " ;
    > strFocalPerson += " WHERE CommunityID = " + this.CommunityID ;
    > strFocalPerson += " ORDER BY CommunityContactID " ;
    >
    > objFocalPersonCommand.CommandText = strFocalPerson;
    > objFocalPersonCommand.Connection = objConnIV;
    > objFocalPerson = objFocalPersonCommand.ExecuteReader();
    >
    > EditCommunityDataForm.ID = "EditCommunityDataForm";
    >
    > CommunityIDTextBox.ID = "CommunityID";
    > CommunityIDTextBox.Attributes["name"] = "CommunityID";
    > CommunityIDTextBox.Attributes["style"] = "position:absolute;
    > left:450; top:30;display:none;";
    > CommunityIDTextBox.CssClass = "LinenInputStyle";
    > CommunityIDTextBox.Visible = true;
    > CommunityIDTextBox.Text = this.CommunityID.ToString();
    >
    > EditCommunityDataForm.Controls.Add(CommunityIDTextBox);
    >
    > LastModifiedDateTextBox.ID = "LastModifiedDate";
    > LastModifiedDateTextBox.Attributes["name"] =
    > "LastModifiedDate";
    > LastModifiedDateTextBox.Attributes["style"] =
    > "position:absolute; left:450; top:50;display:none;";
    > LastModifiedDateTextBox.CssClass = "LinenInputStyle";
    > LastModifiedDateTextBox.Visible = true;
    > LastModifiedDateTextBox.Text =
    > this.LastModifiedDate.ToString();
    > EditCommunityDataForm.Controls.Add(LastModifiedDateTextBox);
    >
    > lblInstructions.Attributes["style"] = "position:absolute;
    > left:5; top:10;background-Color:#c0c0c0;border:1px solid #000000;";
    > if (this is PageFactory.AddCommunities)
    > {
    > lblInstructions.Text = "Please enter the details of the new
    > community in the appropriate fields";
    > }
    > else
    > {
    > lblInstructions.Text = "To edit any of the details of this
    > Community please modify the values in the appropriate fields";
    > }
    > lblInstructions.CssClass = "NiceSmallDetails";
    > EditCommunityDataForm.Controls.Add(lblInstructions);
    >
    > lblCommunityName.Attributes["style"] = "position:absolute;
    > left:5; top:35;";
    > lblCommunityName.Text = "Community Name";
    > lblCommunityName.CssClass = "NiceSmallDetails";
    > EditCommunityDataForm.Controls.Add(lblCommunityName);
    >
    > txtCommunityName.ID = "CommunityName";
    > txtCommunityName.Attributes["name"] = "CommunityName";
    > txtCommunityName.Attributes["OnKeyDown"] = "GetDate()";
    > txtCommunityName.Attributes["style"] = "position:absolute;
    > left:150; top:30;";
    > txtCommunityName.CssClass = "LinenInputStyle";
    > txtCommunityName.Text = this.CommunityName;
    > EditCommunityDataForm.Controls.Add(txtCommunityName);
    >
    > lblDistrict.Attributes["style"] = "position:absolute; left:5;
    > top:60;";
    > lblDistrict.Text = "District";
    > lblDistrict.CssClass = "NiceSmallDetails";
    > EditCommunityDataForm.Controls.Add(lblDistrict);
    >
    > lstDistrict.ID = "DistrictID";
    > lstDistrict.Attributes["name"] = "DistrictID";
    > lstDistrict.Attributes["style"] = "position:absolute; left:150;
    > top:55;border solid 1px;";
    > lstDistrict.CssClass = "LinenInputStyle";
    > lstDistrict.DataSource = objDistricts;
    > lstDistrict.DataValueField = "DistrictID";
    > lstDistrict.DataTextField = "DistrictName";
    > lstDistrict.DataBind();
    > lstDistrict.SelectedIndex = this.mDistrictID - 1;
    > EditCommunityDataForm.Controls.Add(lstDistrict);
    >
    > lblFocalPerson.Attributes["style"] = "position:absolute;
    > left:5; top:83;";
    > lblFocalPerson.Text = "Focal Person";
    > lblFocalPerson.CssClass = "NiceSmallDetails";
    > EditCommunityDataForm.Controls.Add(lblFocalPerson);
    >
    > lstFocalPerson.ID = "FocalPersonID";
    > lstFocalPerson.Attributes["name"] = "FocalPersonID";
    > lstFocalPerson.Attributes["style"] = "position:absolute;
    > left:150; top:78;border solid 1px;";
    > lstFocalPerson.CssClass = "LinenInputStyle";
    > lstFocalPerson.DataSource = objFocalPerson;
    > lstFocalPerson.DataValueField = "CommunityContactID";
    > lstFocalPerson.DataTextField = "CommunityContact";
    > lstFocalPerson.DataBind();
    >
    > try
    > {
    > lstFocalPerson.SelectedValue =
    > this.mFocalPersonID.ToString();
    > }
    > catch
    > {
    > }
    >
    > EditCommunityDataForm.Controls.Add(lstFocalPerson);
    >
    > lblLongitude.Attributes["style"] = "position:absolute; left:5;
    > top:107;";
    > lblLongitude.Text = "Longitude";
    > lblLongitude.CssClass = "NiceSmallDetails";
    > EditCommunityDataForm.Controls.Add(lblLongitude);
    >
    > txtLongitude.ID = "Longitude";
    > txtLongitude.Attributes["name"] = "Longitude";
    > txtLongitude.Attributes["style"] = "position:absolute;
    > left:150; top:102;";
    > txtLongitude.CssClass = "LinenInputStyle";
    > txtLongitude.Text = this.Longitude;
    > EditCommunityDataForm.Controls.Add(txtLongitude);
    >
    > lblLatitude.Attributes["style"] = "position:absolute; left:5;
    > top:130;";
    > lblLatitude.Text = "Latitude";
    > lblLatitude.CssClass = "NiceSmallDetails";
    > EditCommunityDataForm.Controls.Add(lblLatitude);
    >
    > txtLatitude.ID = "Latitude";
    > txtLatitude.Attributes["name"] = "Latitude";
    > txtLatitude.Attributes["style"] = "position:absolute; left:150;
    > top:127;";
    > txtLatitude.CssClass = "LinenInputStyle";
    > txtLatitude.Text = this.Latitude;
    > EditCommunityDataForm.Controls.Add(txtLatitude);
    >
    > lblEndemicity.Attributes["style"] = "position:absolute; left:5;
    > top:153;";
    > lblEndemicity.Text = "Endemicity";
    > lblEndemicity.CssClass = "NiceSmallDetails";
    > EditCommunityDataForm.Controls.Add(lblEndemicity);
    >
    > lstEndemicity.ID = "EndemicityID";
    > lstEndemicity.Attributes["name"] = "EndemicityID";
    > lstEndemicity.Attributes["style"] = "position:absolute;
    > left:150; top:152;border solid 1px;";
    > lstEndemicity.CssClass = "LinenInputStyle";
    > lstEndemicity.DataSource = objEndemicity;
    > lstEndemicity.DataValueField = "EndemicityID";
    > lstEndemicity.DataTextField = "Endemicity";
    > lstEndemicity.DataBind();
    > lstEndemicity.SelectedIndex = this.mEndemicityID - 1;
    > EditCommunityDataForm.Controls.Add(lstEndemicity);
    >
    > lblEstimatedTrees.Attributes["style"] = "position:absolute;
    > left:5; top:176;";
    > lblEstimatedTrees.Text = "Estimated Trees";
    > lblEstimatedTrees.CssClass = "NiceSmallDetails";
    > EditCommunityDataForm.Controls.Add(lblEstimatedTrees);
    >
    > txtEstimatedTrees.ID = "EstimatedTrees";
    > txtEstimatedTrees.Attributes["name"] = "EstimatedTrees";
    > txtEstimatedTrees.Attributes["onblur"] = "Monetize()";
    > txtEstimatedTrees.Attributes["onkeydown"] =
    > "ValidateNumeric()";
    > txtEstimatedTrees.Attributes["style"] = "position:absolute;
    > left:150; top:174;";
    > txtEstimatedTrees.CssClass = "LinenInputStyle";
    > txtEstimatedTrees.Text = this.mEstimatedTrees.ToString();
    > EditCommunityDataForm.Controls.Add(txtEstimatedTrees);
    >
    > lblEstimatedYield.Attributes["style"] = "position:absolute;
    > left:5; top:202;";
    > lblEstimatedYield.Text = "Estimated Yield";
    > lblEstimatedYield.CssClass = "NiceSmallDetails";
    > EditCommunityDataForm.Controls.Add(lblEstimatedYield);
    >
    > txtEstimatedYield.ID = "EstimatedYield";
    > txtEstimatedYield.Attributes["name"] = "EstimatedYield";
    > txtEstimatedYield.Attributes["onblur"] = "Monetize()";
    > txtEstimatedYield.Attributes["onkeydown"] =
    > "ValidateNumeric()";
    > txtEstimatedYield.Attributes["style"] = "position:absolute;
    > left:150; top:199;";
    > txtEstimatedYield.CssClass = "LinenInputStyle";
    > txtEstimatedYield.Text =
    > this.mEstimatedYield.ToString("#,##0.00;(#,##0.00);0");
    >
    > EditCommunityDataForm.Controls.Add(txtEstimatedYield);
    >
    > lblCommunityStatus.Attributes["style"] = "position:absolute;
    > left:5; top:225;";
    > lblCommunityStatus.Text = "Community Status";
    > lblCommunityStatus.CssClass = "NiceSmallDetails";
    > EditCommunityDataForm.Controls.Add(lblCommunityStatus);
    >
    > lstCommunityStatus.ID = "CommunityStatusID";
    > lstCommunityStatus.Attributes["name"] = "CommunityStatusID";
    > lstCommunityStatus.Attributes["style"] = "position:absolute;
    > left:150; top:224;border solid 1px;";
    > lstCommunityStatus.CssClass = "LinenInputStyle";
    > lstCommunityStatus.DataSource = objCommunityStatus;
    > lstCommunityStatus.DataValueField = "CommunityStatusID";
    > lstCommunityStatus.DataTextField = "CommunityStatus";
    > lstCommunityStatus.DataBind();
    > lstCommunityStatus.SelectedIndex = this.mCommunityStatusID - 1;
    > EditCommunityDataForm.Controls.Add(lstCommunityStatus);
    >
    > SaveButton.ID = "SaveButton";
    > SaveButton.Attributes["name"] = SaveButton.UniqueID ;
    > SaveButton.Attributes["OnClick"] = "EditCommunityDataForm.Submit()";
    > if (this is PageFactory.AddCommunities)
    > {
    > SaveButton.Value = "Create Community";
    > }
    > else
    > {
    > SaveButton.Value = "Save Community Details";
    > }
    > SaveButton.Attributes["style"] = "position:absolute; left:150;
    > top:300;width:170;";
    > EditCommunityDataForm.Controls.Add(SaveButton);
    >
    > Page.Controls.Add(EditCommunityDataForm);
    >
    > Render(base.CreateHtmlTextWriter(HttpContext.Current.Response.Output));
    >
    > objConn.Close();
    > objConnII.Close();
    > objConnIII.Close();
    > }
    >
    > -----------------------
    > Posted by a user from .NET 247 (http://www.dotnet247.com/)
    >
    > <Id>Zxfe8Q2jB0SUEnYJEjno2A==</Id>
    Ken Cox [Microsoft MVP], Apr 9, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Juan Irigoyen
    Replies:
    0
    Views:
    455
    Juan Irigoyen
    Sep 2, 2004
  2. Juan Irigoyen
    Replies:
    0
    Views:
    338
    Juan Irigoyen
    Sep 7, 2004
  3. Juan Irigoyen
    Replies:
    0
    Views:
    379
    Juan Irigoyen
    Oct 6, 2004
  4. rockdale
    Replies:
    1
    Views:
    590
    Juan T. Llibre
    Aug 23, 2006
  5. Nagaraj
    Replies:
    1
    Views:
    842
    Lionel B
    Mar 1, 2007
Loading...

Share This Page