Re: Assigning contents within HTML tag to string variable.

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Ken Cox [Microsoft MVP] (BANSPAMken_cox_at_sympatico.ca)
Date: 08/04/04


Date: Wed, 4 Aug 2004 19:47:12 -0400

Hi Bill,

Could you clarify what you mean by assign it to a string variable? Are you
trying to insert the DIV content from the code-behind?

A literal control will hold that kind of content if that's what you need.

Ken

"Bill Mild" <Bill Mild@discussions.microsoft.com> wrote in message
news:064C93C2-E361-4DD5-B509-22160FBD3F6B@microsoft.com...
>I have an aspx web form below. I would like to grab the contents within
>the <div id="content"> tag and assign it to a string variable. This is not
>well-formed XML so I can't use XML, unless there is a simple way to turn
>this into well-formed XML. I need some ideas. Thanks, William Mild
>
> <%@ Page language="c#" Codebehind="index.aspx.cs" AutoEventWireup="false"
> Inherits="vna.AboutUs.index" %>
> <%@ Register TagPrefix="wilson" Namespace="Wilson.MasterPages"
> Assembly="WilsonMasterPages" %>
> <wilson:masterpage id="MPContainer" runat="server"
> TemplateFile="../Template.ascx">
> <DIV id="crumb"><IMG id="Img1" src="~/images/child_04.jpg" border="0"
> name="child_04" runat="server"></DIV>
> <DIV id="subsectionheader">About Us</DIV>
> <DIV id="sectionImage"><IMG id="Img2" src="~/images/aboutus.jpg"
> runat="server"></DIV>
> <Div id="content">
>
> <P>We work closely with your physician to plan for and provide the
> services you
> need to get better at home. Our expert staff of nurses, plus physical,
> occupational and speech therapists is available to you as necessary. We
> also
> offer maternal/child health, pediatric care, wound care, medical social
> services, nutritional counseling and are able to provide home health aides
> to
> assist you with personal, non-medical care. We will show you how to obtain
> and
> use any equipment or supplies your doctor may have prescribed and will
> direct
> you to appropriate community services for other types of support.
> </P>
>
> <UL>
> <LI>
> You or your family
> <LI>
> Your physician
> <LI>
> Your case manager or health care professional
> <LI>
> A community agency
> <LI>
> A coordinator in a hospital or nursing facility
> <LI>
> An assisted living or rehabilitation facility
> </LI>
> </UL>
> <P>When we receive the call, well start by talking with your physician
> about you
> and promptly set up a visit, so we can determine what we are able to do
> for
> you. It <EM>really </EM>is that simple!
> </P>
> <P>From the beginning, we involve you in your plan of care and, when
> possible,
> teach family members who want to participate in treatments or therapies.
> Well
> make a schedule of regular visits from our nurses and/or therapists, plus
> we
> are on call and available to you 24 hours a day, 7 days a week.
> </P>
> <P>Your goal is to be well and independent.
> </P>
> <P>Our goal is to get you there, in the comfort of your own home or
> residence.
> </P>
> </Div>
> <DIV id="subsectionfooter"><STRONG>Mission | <A
> href="History.aspx">
> History</A> | Accreditation </STRONG>
> </DIV>
> </wilson:masterpage>
>



Relevant Pages