Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

Changing the contents of an ASP Panel

$
0
0
I have been working on this little problem for weeks and I am becoming highly frustrated.

I have a panel on my page that I want to dynamically change.

I use the following code (Just a snippet);


Select myFlag
Case 1
txt = New TextBox
txt.Width = "300"
txt.Text = "You must Check either Yes Or No here."
txt.ReadOnly = True
txt.ForeColor = Drawing.Color.Red
txt.BackColor = Drawing.Color.Transparent
txt.Font.Size = "12"
txt.Font.Italic = True
txt.Font.Bold = True

pnlSpouseErr.Controls.Add(txt)

End Select


It does not update the panel.

If I take the updating code out of the Select Statement it does the update.

The variable myFlag always will equal 1 and when I step through the code, it seems to run the lines in question but the panel does not update.

Thanks for your help

Viewing all articles
Browse latest Browse all 688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>