Ask a Question related to ASP.NET General, Design and Development.
-
Steven #1
adding dynamic content to a button
Hi. I am having a small problem. I am trying to add a
dynamic attribute to a regular html button, but I also
have a runat="server" attribute on it because at one
point it's invisible, and I make it visible...
Everything works when I take out runat="server", but when
I leave it, it actually prints out lblSSN.Text rather
than substituting it with a number. Here is the code
<input type="button" runat="server"
id="buttonAddGuardian" value="Add Guardian"
onClick="window.open('addguardian.aspx?id=<%=lblSS N.Text%I would like the HTML source look like window.open>');"/>
('addguardian.aspx?id=123456789') Thank you.
Steven Guest
-
Dynamically adding Dropdown, Text Box, Add Button and Remove Button
Hi Everyone, I am facing a poblem in creating a row which contains following scenario in ASP.NET |DROP_DOWN_LIST | |TEXT_BOX| ... -
adding a hyperlink to flash content
i have a small flash (swf) file inseted onto my dreamweaver document is it possible to hyperlink this to another page? -
Adding a second button if the first button is clicked
Hi I build my form dynamically in Page_Load, with a button If the user clicks the button I want to create another button. I can do this but the... -
Adding literal content to webcontrol via editor
Hi Experts. I developed a menu webcontrol, which can be constrcuted by inline XML, something like that: <cc1:menu runat=server id=....>... -
Adding content to a shockwave website
I have a website that I created in Director 9 MX and I can't figure out how to add a content box for text and pics that is scrollable. any help... -
S. Justin Gengo #2
Re: adding dynamic content to a button
Steven,
Instead of placing the window.open parameter the way you are doing set it
using the attributes method of the button in the codebehind page.
buttonAddGuardian.Attributes.Add("onClick",
"javascript:window.open('addguardian.aspx?id=" & lblSSN.Text & "');")
Sincerely,
--
S. Justin Gengo, MCP
Web Developer
Free code library at:
[url]www.aboutfortunate.com[/url]
"Out of chaos comes order."
Nietzche
"Steven" <stevenzilberman@alum.rpi.edu> wrote in message
news:08de01c3601f$03ada470$a501280a@phx.gbl...> Hi. I am having a small problem. I am trying to add a
> dynamic attribute to a regular html button, but I also
> have a runat="server" attribute on it because at one
> point it's invisible, and I make it visible...
> Everything works when I take out runat="server", but when
> I leave it, it actually prints out lblSSN.Text rather
> than substituting it with a number. Here is the code
>
> <input type="button" runat="server"
> id="buttonAddGuardian" value="Add Guardian"
> onClick="window.open('addguardian.aspx?id=<%=lblSS N.Text%>> >');"/>
> I would like the HTML source look like window.open
> ('addguardian.aspx?id=123456789') Thank you.
S. Justin Gengo Guest



Reply With Quote

