Click here to Skip to main content
15,897,273 members
Home / Discussions / C#
   

C#

 
AnswerRe: Looping through form elements Pin
Wjousts17-May-06 5:31
Wjousts17-May-06 5:31 
GeneralRe: Looping through form elements Pin
J4amieC17-May-06 5:47
J4amieC17-May-06 5:47 
GeneralRe: Looping through form elements Pin
Brendan Vogt17-May-06 22:52
Brendan Vogt17-May-06 22:52 
AnswerRe: Looping through form elements Pin
stancrm18-May-06 2:50
stancrm18-May-06 2:50 
QuestionRe: Looping through form elements Pin
Brendan Vogt18-May-06 3:29
Brendan Vogt18-May-06 3:29 
GeneralRe: Looping through form elements Pin
Brendan Vogt15-Jun-06 0:38
Brendan Vogt15-Jun-06 0:38 
QuestionLicensing Scheme for C# apps Pin
student_rhr17-May-06 3:22
student_rhr17-May-06 3:22 
Questiona question about messageboxbuttons.okcancel ? Pin
cmpeng3417-May-06 3:14
cmpeng3417-May-06 3:14 
AnswerRe: a question about messageboxbuttons.okcancel ? Pin
Colin Angus Mackay17-May-06 3:22
Colin Angus Mackay17-May-06 3:22 
AnswerRe: a question about messageboxbuttons.okcancel ? Pin
stancrm17-May-06 3:28
stancrm17-May-06 3:28 
AnswerRe: a question about messageboxbuttons.okcancel ? Pin
coolestCoder17-May-06 3:40
coolestCoder17-May-06 3:40 
QuestionMS Outlook-esque control Pin
NewbieDude17-May-06 3:01
NewbieDude17-May-06 3:01 
AnswerRe: MS Outlook-esque control Pin
J4amieC17-May-06 3:04
J4amieC17-May-06 3:04 
AnswerRe: MS Outlook-esque control Pin
ekynox17-May-06 22:01
ekynox17-May-06 22:01 
GeneralRe: MS Outlook-esque control Pin
NewbieDude17-May-06 22:04
NewbieDude17-May-06 22:04 
QuestionOpen .xls file in excel from code Pin
livez17-May-06 3:01
livez17-May-06 3:01 
AnswerRe: Open .xls file in excel from code Pin
CWIZO17-May-06 9:10
CWIZO17-May-06 9:10 
GeneralRe: Open .xls file in excel from code Pin
livez17-May-06 20:10
livez17-May-06 20:10 
GeneralRe: Open .xls file in excel from code Pin
CWIZO17-May-06 20:49
CWIZO17-May-06 20:49 
GeneralRe: Open .xls file in excel from code Pin
livez17-May-06 21:33
livez17-May-06 21:33 
QuestionGet physical location of IIS root Pin
lovyou5217-May-06 2:57
lovyou5217-May-06 2:57 
AnswerRe: Get physical location of IIS root Pin
Colin Angus Mackay17-May-06 3:16
Colin Angus Mackay17-May-06 3:16 
GeneralRe: Get physical location of IIS root Pin
leppie17-May-06 19:38
leppie17-May-06 19:38 
GeneralRe: Get physical location of IIS root Pin
Colin Angus Mackay17-May-06 20:12
Colin Angus Mackay17-May-06 20:12 
QuestionTextbox not displaying Pin
Brendan Vogt17-May-06 2:54
Brendan Vogt17-May-06 2:54 
Hi,

I'm using ASP.NET and C#.NET 2. I have to dynamically display all hubs for a given hub group. A user selects the hub group from a drop down, and all the related hubs load, with a textbox next to it. The id of the textbox will depend on the id of the hub, so if the hub ID is 2, then it's corresponding textbox name will be txtHub2.

This my table where I have a label control. The label control will contain all the <tr></tr> and <td></td>.

<table border="1" cellpadding="0" cellspacing="0" width="100%">

<asp:Label id="lblHubCommissions" runat="server" />

</table>

In cboHubGroup_SelectedIndexChanged(object sender, EventArgs e) event handler I have the following:

string strHubs = string.Empty;

List<Hub> lstHubs = Hub.GetHubsByHubGroupID(Int32.Parse(cboHubGroup.SelectedValue));

foreach (Hub h in lstHubs)
{
strHubs = strHubs + "<tr>" +
"<td width=\"30%\">" + h.HubName + "</td>" +
"<td width=\"70%\">" + "<asp:TextBox id=\"txtHub" + h.HubID + "\" Columns=\"35\" MaxLength=\"50\" CssClass=\"InputText\" runat=\"server\" /><br />" + "</td>" +
"</tr>";
}

if (strHubs != string.Empty)
lblHubCommissions.Text = strHubs.Substring(0, strHubs.Length - 2);
else
lblHubCommissions.Text = "No available hubs.";

The textboxes don't wan't to display. But if I view the source then it is there. Why is this?

Regards,
ma se
(South Africa)

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.