Re: Dynamic Table Question
From: ASP Yaboh (ASPYaboh_at_discussions.microsoft.com)
Date: 09/09/04
- Next message: Jim Smith: "Moving ASP.Net programs to production"
- Previous message: Curt_C [MVP]: "Re: Norton Internet Security blocks some of my ASP.NET pages"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 9 Sep 2004 09:01:02 -0700
Stan,
You should do it via Javascript ".display or .visibility", e.g.
function hideShowTable(tableName) {
document..getElementById("tableName").style.display="none";
// In IE6, "none" hides it. "block" shows it.
}// fn
You'll have to do some other minor coding to hide the current table showing
and store the current one being unhidden.
The function "hideShowTable()" would be triggered by a Javascript action
some HTML control.
"Stan Sainte-Rose" wrote:
> Maybe I have to reconsider my code.
>
> Here s what I want to do (I works fine with ASP and I m trying to do it with
> asp.net)
>
> I need to load 16 tables, and hide 15 of them.
> I have a another table where I display the years between 1993 to 2008
> When I choose one year, I would like to hide all the table and just display
> the table regarding the year.
> Within asp, I m using Span and a javascript for hiding/showing the right
> table.
> Any help ?
>
> Of course all the tables are dynamic and their content come from a database.
> I don't have problems with the ado.net part..
>
> Stan
>
>
>
>
>
>
> "Ryan Riddell" <RyanRiddell@discussions.microsoft.com> a écrit dans le
> message de news: 882F9FAE-2ADB-478C-B797-DB040E57284E@microsoft.com...
> > Can you do this while inside the for loop?
> >
> > Otherwise you can do ((Table)container.FindControl("Q" + i)).Visible =
> > false;. Where container is the object you added the table controls to.
> But
> > I'm not sure if the container controls will be available immediately after
> > adding them.
> >
> > "Stan Sainte-Rose" wrote:
> >
> > > Hi,
> > >
> > > I use this bit of code to generate dynamic tables in the page load
> section
> > > ....
> > > Dim ntable as New Table
> > > For i = 1993 To 2008
> > > ntable = New Table
> > > ntable.ID = "Q" + i.ToString
> > > ....
> > > ....
> > > Next
> > >
> > > How to use the properties of each table ?
> > > I would like to set visible and not visible some of them using their ID.
> > >
> > > Stan
> > >
> > >
> > >
>
>
>
- Next message: Jim Smith: "Moving ASP.Net programs to production"
- Previous message: Curt_C [MVP]: "Re: Norton Internet Security blocks some of my ASP.NET pages"
- Messages sorted by: [ date ] [ thread ]