Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Cant Render Page Control with Visual Studio 2005 Beta

Reply
Thread Tools

Cant Render Page Control with Visual Studio 2005 Beta

 
 
ebo beecham via .NET 247
Guest
Posts: n/a
 
      04-09-2005
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.RenderAttribut es(HtmlTextWriter writer) +491
System.Web.UI.HtmlControls.HtmlControl.RenderBegin Tag(HtmlTextWriter writer) +33
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTex tWriter output) +55
System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter 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(HtmlTextWrite r 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(HttpCont ext context) +12716
System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute() +186
System.Web.HttpApplication.ExecuteStep(IExecutionS tep 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.dbloc ation() );
OleDbConnection objConnII = new OleDbConnection(PageFactory.ConnectionString.dbloc ation() );
OleDbConnection objConnIII = new OleDbConnection(PageFactory.ConnectionString.dbloc ation() );
OleDbConnection objConnIV = new OleDbConnection(PageFactory.ConnectionString.dbloc ation() );
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(CommunityIDText Box);

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(LastModifiedDat eTextBox);

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(lblCommunityNam e);

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(txtCommunityNam e);

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(lblEstimatedTre es);

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(txtEstimatedTre es);

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

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(txtEstimatedYie ld);

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

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(lstCommunitySta tus);

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.Curre nt.Response.Output));

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

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

<Id>Zxfe8Q2jB0SUEnYJEjno2A==</Id>
 
Reply With Quote
 
 
 
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      04-09-2005
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/A...nSwitcher.aspx

"ebo beecham via .NET 247" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.RenderAttribut es(HtmlTextWriter
> writer) +491
> System.Web.UI.HtmlControls.HtmlControl.RenderBegin Tag(HtmlTextWriter
> writer) +33
> System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTex tWriter output) +55
> System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter 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(HtmlTextWrite r 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(HttpCont ext context) +12716
>
> System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute()
> +186
> System.Web.HttpApplication.ExecuteStep(IExecutionS tep 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.dbloc ation() );
> OleDbConnection objConnII = new
> OleDbConnection(PageFactory.ConnectionString.dbloc ation() );
> OleDbConnection objConnIII = new
> OleDbConnection(PageFactory.ConnectionString.dbloc ation() );
> OleDbConnection objConnIV = new
> OleDbConnection(PageFactory.ConnectionString.dbloc ation() );
> 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(CommunityIDText Box);
>
> 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(LastModifiedDat eTextBox);
>
> 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(lblCommunityNam e);
>
> 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(txtCommunityNam e);
>
> 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(lblEstimatedTre es);
>
> 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(txtEstimatedTre es);
>
> lblEstimatedYield.Attributes["style"] = "position:absolute;
> left:5; top:202;";
> lblEstimatedYield.Text = "Estimated Yield";
> lblEstimatedYield.CssClass = "NiceSmallDetails";
> EditCommunityDataForm.Controls.Add(lblEstimatedYie ld);
>
> 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(txtEstimatedYie ld);
>
> lblCommunityStatus.Attributes["style"] = "position:absolute;
> left:5; top:225;";
> lblCommunityStatus.Text = "Community Status";
> lblCommunityStatus.CssClass = "NiceSmallDetails";
> EditCommunityDataForm.Controls.Add(lblCommunitySta tus);
>
> 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(lstCommunitySta tus);
>
> 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.Curre nt.Response.Output));
>
> objConn.Close();
> objConnII.Close();
> objConnIII.Close();
> }
>
> -----------------------
> Posted by a user from .NET 247 (http://www.dotnet247.com/)
>
> <Id>Zxfe8Q2jB0SUEnYJEjno2A==</Id>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enabling browser back button for GridView Paging and Sorting in Ajax1.1 and 3.5 (using Visual Studio 2005/ Visual studio 2008) anil reddy ASP .Net 0 02-11-2009 04:22 PM
Is Visual Studio 2005 complict with Visual Studio 2003 rockdale ASP .Net 1 08-23-2006 07:20 PM
Should I write Visual studio 2005 or Visual studio 2003 MCSD =?Utf-8?B?VmlqYXk=?= Microsoft Certification 14 06-30-2006 09:05 AM
Page.Render do not render complete page Lau Lei Cheong ASP .Net 1 05-15-2004 04:10 AM



Advertisments