tag object

Discussion in 'ASP .Net' started by miki79, Apr 3, 2008.

  1. miki79

    miki79 Guest

    Hi,

    it's possible to use a html tag object as a tag iframe. When a declare in a
    acsx file the tag object, i can't access to them with the codebehind C#.
    Visual Studio says that there is no definition for the ID of the tag object.

    Can you help me?
    Regards
    Michele
     
    miki79, Apr 3, 2008
    #1
    1. Advertising

  2. Do you mean you have an <iframe id="myFrame" .. /> tag in the markup and you
    want to access it from c#? If that's what you need, just add runat="server":

    <iframe id="myFrame" runat="server" ... />

    --
    Eliyahu Goldin,
    Software Developer
    Microsoft MVP [ASP.NET]
    http://msmvps.com/blogs/egoldin
    http://usableasp.net


    "miki79" <> wrote in message
    news:...
    > Hi,
    >
    > it's possible to use a html tag object as a tag iframe. When a declare in
    > a
    > acsx file the tag object, i can't access to them with the codebehind C#.
    > Visual Studio says that there is no definition for the ID of the tag
    > object.
    >
    > Can you help me?
    > Regards
    > Michele
     
    Eliyahu Goldin, Apr 3, 2008
    #2
    1. Advertising

  3. miki79

    miki79 Guest

    Excuse me for the bad question.

    i have the <object id="myObject" .. runat="server" /> tag in the markup and
    i want access it from C#

    example:

    this.myObject.Attributes.Add("data", "http://www.microsoft.com");

    but Visual Studio says that there is no definition for myObject. I must use
    <object instead of <iframe for problem of accessibility

    Regards
    Michele




    "Eliyahu Goldin" wrote:

    > Do you mean you have an <iframe id="myFrame" .. /> tag in the markup and you
    > want to access it from c#? If that's what you need, just add runat="server":
    >
    > <iframe id="myFrame" runat="server" ... />
    >
    > --
    > Eliyahu Goldin,
    > Software Developer
    > Microsoft MVP [ASP.NET]
    > http://msmvps.com/blogs/egoldin
    > http://usableasp.net
    >
    >
    > "miki79" <> wrote in message
    > news:...
    > > Hi,
    > >
    > > it's possible to use a html tag object as a tag iframe. When a declare in
    > > a
    > > acsx file the tag object, i can't access to them with the codebehind C#.
    > > Visual Studio says that there is no definition for the ID of the tag
    > > object.
    > >
    > > Can you help me?
    > > Regards
    > > Michele

    >
    >
    >
     
    miki79, Apr 3, 2008
    #3
  4. miki79

    bruce barker Guest

    just like script, an <object runat=server id=myObject> defines a server
    side object (not a client side) that is accessible from c#. its
    properties match the object type of course.

    to define a client side object from the codebehind you need to use a
    different control.

    -- bruce (sqlwork.com)

    miki79 wrote:
    > Excuse me for the bad question.
    >
    > i have the <object id="myObject" .. runat="server" /> tag in the markup and
    > i want access it from C#
    >
    > example:
    >
    > this.myObject.Attributes.Add("data", "http://www.microsoft.com");
    >
    > but Visual Studio says that there is no definition for myObject. I must use
    > <object instead of <iframe for problem of accessibility
    >
    > Regards
    > Michele
    >
    >
    >
    >
    > "Eliyahu Goldin" wrote:
    >
    >> Do you mean you have an <iframe id="myFrame" .. /> tag in the markup and you
    >> want to access it from c#? If that's what you need, just add runat="server":
    >>
    >> <iframe id="myFrame" runat="server" ... />
    >>
    >> --
    >> Eliyahu Goldin,
    >> Software Developer
    >> Microsoft MVP [ASP.NET]
    >> http://msmvps.com/blogs/egoldin
    >> http://usableasp.net
    >>
    >>
    >> "miki79" <> wrote in message
    >> news:...
    >>> Hi,
    >>>
    >>> it's possible to use a html tag object as a tag iframe. When a declare in
    >>> a
    >>> acsx file the tag object, i can't access to them with the codebehind C#.
    >>> Visual Studio says that there is no definition for the ID of the tag
    >>> object.
    >>>
    >>> Can you help me?
    >>> Regards
    >>> Michele

    >>
    >>
     
    bruce barker, Apr 3, 2008
    #4
  5. miki79

    miki79 Guest

    Hi, but i don't be able to access at the myObject from C#. I don't understand
    why if i declare an IFRAME, i can access to it, but it's not possibile if i
    declare a tag object.

    Regard
    Michele

    "bruce barker" wrote:

    > just like script, an <object runat=server id=myObject> defines a server
    > side object (not a client side) that is accessible from c#. its
    > properties match the object type of course.
    >
    > to define a client side object from the codebehind you need to use a
    > different control.
    >
    > -- bruce (sqlwork.com)
    >
    > miki79 wrote:
    > > Excuse me for the bad question.
    > >
    > > i have the <object id="myObject" .. runat="server" /> tag in the markup and
    > > i want access it from C#
    > >
    > > example:
    > >
    > > this.myObject.Attributes.Add("data", "http://www.microsoft.com");
    > >
    > > but Visual Studio says that there is no definition for myObject. I must use
    > > <object instead of <iframe for problem of accessibility
    > >
    > > Regards
    > > Michele
    > >
    > >
    > >
    > >
    > > "Eliyahu Goldin" wrote:
    > >
    > >> Do you mean you have an <iframe id="myFrame" .. /> tag in the markup and you
    > >> want to access it from c#? If that's what you need, just add runat="server":
    > >>
    > >> <iframe id="myFrame" runat="server" ... />
    > >>
    > >> --
    > >> Eliyahu Goldin,
    > >> Software Developer
    > >> Microsoft MVP [ASP.NET]
    > >> http://msmvps.com/blogs/egoldin
    > >> http://usableasp.net
    > >>
    > >>
    > >> "miki79" <> wrote in message
    > >> news:...
    > >>> Hi,
    > >>>
    > >>> it's possible to use a html tag object as a tag iframe. When a declare in
    > >>> a
    > >>> acsx file the tag object, i can't access to them with the codebehind C#.
    > >>> Visual Studio says that there is no definition for the ID of the tag
    > >>> object.
    > >>>
    > >>> Can you help me?
    > >>> Regards
    > >>> Michele
    > >>
    > >>

    >
     
    miki79, Apr 3, 2008
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    511
    Kevin Spencer
    May 16, 2005
  2. shruds
    Replies:
    1
    Views:
    962
    John C. Bollinger
    Jan 27, 2006
  3. Chris Lieb
    Replies:
    8
    Views:
    10,900
  4. Sanny
    Replies:
    4
    Views:
    440
    Arne Vajhøj
    Aug 20, 2012
  5. Arne Vajhøj
    Replies:
    0
    Views:
    487
    Arne Vajhøj
    Aug 20, 2012
Loading...

Share This Page