Ask a Question related to ASP.NET Building Controls, Design and Development.
-
MattKlepeis@gmail.com #1
Object Delayed loading dynamically into Placeholder
I have a placeholder and I have a section of code that will load a
question into the placeholder depending on what is selected in a group
of dropdownlists.
The problem that I am running into is that the questions that are
loading are for the previously selected request. The questions are not
popping up real time.
Here is my section of code, any help you could give would be greatly
appreciated
protected void ddlRequest_SelectedIndexChanged(object sender, EventArgs
e)
{
//phTextBoxes.Controls.Clear();
int index = ddlRequest.SelectedIndex;
test.Text = index.ToString();
questionSource.SelectCommand = "SELECT assoc_request, question,
question_id, question_num FROM nocsr_question WHERE assoc_request = " +
index;
for (int counter = 1;counter <= ddlQuestion.Items.Count;
counter++)
{
TextBox tb = new TextBox();
tb.Width = 200;
tb.Height = 20;
//tb.TextMode = TextBoxMode.MultiLine;
tb.ID = "TextBoxID" + (counter + 1).ToString();
// add some dummy data to textboxes
tb.Text = "This is textbox " + counter;
phTextBoxes.Controls.Add(new LiteralControl("<b>" +
ddlQuestion.Items.FindByValue(counter.ToString()) + ": </b>"));
phTextBoxes.Controls.Add(tb);
phTextBoxes.Controls.Add(new LiteralControl("<br>"));
Page.
}
}
MattKlepeis@gmail.com Guest
-
Dynamically Loading User Control in PlaceHolder
Hi , I load dynamically a user control in PlaceHolder with the number of fileds in db. When loading user control there is no problem, if returning... -
How should I announce the list of delayed class/object/method loaders?
I've been maintaining a list of object loaders for quite some time now: http://metaperl.com/article-pod/Catalog-lazy_loaders/lazy_loaders.html ... -
Dynamically loading user control into Placeholder gives Object reference not set to an instance of an object
I've created user controls that contain listboxes that are dynamically populated from the database. In the html view of the user control... -
Build control in a placeholder or like a placeholder
Hi. I create a new custom control and it works fine. But now, I need to put it in any place on the page, like the placehold control do. Someone... -
HELP! Error Loading ASPX : Object Reference not set to an instance object
Hello, When i run my aspx i get this weird error: System.NullReferenceException: Object reference not set to an instance of an object. at...



Reply With Quote

