asp.net - find dynamic added panel -
i'm adding panel web application:
for = 1 amountofrechnungspositionen + 1 dim pnlpositon panel = new panel pnlpositon.id = "pnlpositon" & pnlrechungsposition.controls.add(pnlpositon) ... next
now if onclick button, want delete panel. code.
private sub imgdelrechnungsposition_click(sender object, e imageclickeventargs) handles imgdelrechnungsposition.click amountofrechnungspositionen = convert.toint32(hfamountofrechnungspositionen.value) dim fcpnlpositon panel = directcast(pnlrechungsposition.findcontrol("placeholderid$pnlpositon" + amountofrechnungspositionen.tostring()), panel) fcpnlpositon.dispose() hfamountofrechnungspositionen.value = convert.tostring(amountofrechnungspositionen - 1) end sub
but fcpnlpositon nothing. waht i'm doing wrong?
thank u, reading.
try using:
ctype(pnlrechungsposition.findcontrol("pnlpositon" + amountofrechnungspositionen.tostring()), panel)
the placeholder text client-side markup , want use direct id property.
Comments
Post a Comment