Re: Wrap a div tag around viewstate output

From: Eliyahu Goldin (removemeegoldin_at_monarchmed.com)
Date: 09/19/04


Date: Sun, 19 Sep 2004 17:17:18 +0200

If I understand you correctly, all you want to do is to apply a style to
these inputs. If so, you should be able to do it on client-side with
javascript. Use method getElementsByName to find the elements and just set
their class property to your class name.

Eliyahu

"Henrik Larsen" <henrik.larsen@nospam.com> wrote in message
news:elNCbClnEHA.3968@TK2MSFTNGP11.phx.gbl...
> Hello!
>
> The problem is, when you build a page entirely in css in a certain way
> hidden inputs affect the layout
> of the page. I have someone checking out if it can be handled in css but
it
> doesn't look very promising.
>
> I was thinking that maybe it was possible to write the div wrapper on
> prerender or something. One solution would
> maybe to add the </div> tag just behind the <form...> tag in the code and
> then the generated inputs are written to the
> output and then before it is sendt back to the client add the <div> tag by
> referensing the forms id somehow:
>
> 1. In code, before any rendering: <form id="form1"></div>....
> 2. After it is rendered by asp.net: <form id="form1"><input.....></div>
> 3. Insert befor sendt to client: <form id="form1"><div><input...></div>
>
> I am sure it is possible but how?
>
> Marius
>
> "Eliyahu Goldin" <removemeegoldin@monarchmed.com> skrev i melding
> news:OLycIthnEHA.2764@TK2MSFTNGP11.phx.gbl...
> > Since these inputs are not in the source page code, it is hard to
imagine
> > how you can affect their generation.
> >
> > What is the problem in the first place? What do you mean by "destroying
> the
> > css code"?
> >
> > Eliyahu
> >
> > "Henrik Larsen" <henrik.larsen@nospam.com> wrote in message
> > news:%23yzhK5cnEHA.2172@TK2MSFTNGP10.phx.gbl...
> > > Hello!
> > >
> > > The hidden controls of asp.net destroys the css code in a page I have
> > made:
> > >
> > > I wonder; how can I change this;
> > >
> > > <input type="hidden" name="__EVENTTARGET" value="" />
> > > <input type="hidden" name="__EVENTARGUMENT" value="" />
> > > <input type="hidden" name="__VIEWSTATE" value="xxx" />
> > >
> > > to
> > >
> > > <div>
> > > <input type="hidden" name="__EVENTTARGET" value="" />
> > > <input type="hidden" name="__EVENTARGUMENT" value="" />
> > > <input type="hidden" name="__VIEWSTATE" value="xxx" />
> > > </div>
> > >
> > > Thanks for any help
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: size a DIV as large as needed to fit contents
    ... On this newsgroup ... by now you have 2 people with table suggestions and none with css one. ... Eliyahu ... > I dont really have enough detailed knowledge to know what is the best way. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Apply stylesheet to Hyperlink server control
    ... If I set the CssClass of the HyperLink control, the class property will be ... There are many thinks you can make with css. ... How to remove the built-in style and apply style sheet to the tag? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Wrap a div tag around viewstate output
    ... when you build a page entirely in css in a certain way ... hidden inputs affect the layout ... maybe to add the tag just behind the tag in the code and ... >> The hidden controls of asp.net destroys the css code in a page I have ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: No CSS on login-page
    ... Eliyahu ... > in the head, but IE only use it on the Default page. ... > output from login.aspx as a static html file, the css works perfectly. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Need to add a CSS to a link button
    ... Eliyahu ... > Does anyone know how I can add a css to the following link button. ... > add it so that Update, Cancel and Edit have the css in the form of <a ... > Maz. ...
    (microsoft.public.dotnet.framework.aspnet)