473,419 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

Make Footer invisible

I am using the footer of my Datalist to add a row into my database.

Is there a way to make the footer invisible when not adding a row, making it
visible when a button is pushed and making it invisible again when the page
is posted (after the row is added)?

I have a footer such as:

<FooterTemplate>
<SeparatorTemplate>
<hr style="margin:0">
</SeparatorTemplate>
<asp:textbox id="newQuestion" runat="server" />
<SeparatorTemplate>
<hr style="margin:0">
</SeparatorTemplate>
</FooterTemplate>

Thanks,

Tom
Nov 19 '05 #1
3 3336
solution 1) ITemplate's (as FooterTemplate) can be set by code...

solution 2) define a variable set it when the button is clicked and use:

<FooterTemplate>
<asp:Panel visible='<%=myVar%>'>
<asp:textbox id="newQuestion" runat="server" />
</asp:Panel>
</FooterTemplate>

--
Daniel Fisher(lennybacon)
MCP ASP.NET C#
Blog: http://www.lennybacon.com/
"tshad" <ts**********@ftsolutions.com> wrote in message
news:eG****************@TK2MSFTNGP10.phx.gbl...
I am using the footer of my Datalist to add a row into my database.

Is there a way to make the footer invisible when not adding a row, making
it visible when a button is pushed and making it invisible again when the
page is posted (after the row is added)?

I have a footer such as:

<FooterTemplate>
<SeparatorTemplate>
<hr style="margin:0">
</SeparatorTemplate>
<asp:textbox id="newQuestion" runat="server" />
<SeparatorTemplate>
<hr style="margin:0">
</SeparatorTemplate>
</FooterTemplate>

Thanks,

Tom

Nov 19 '05 #2
"Daniel Fisher(lennybacon)" <info@(removethis)lennybacon.com> wrote in
message news:es**************@TK2MSFTNGP10.phx.gbl...
solution 1) ITemplate's (as FooterTemplate) can be set by code...

solution 2) define a variable set it when the button is clicked and use:

<FooterTemplate>
<asp:Panel visible='<%=myVar%>'>
<asp:textbox id="newQuestion" runat="server" />
</asp:Panel>
</FooterTemplate>
I tried that and it seems to work, but I can't seem to change it
programmably.

My FooterTemplate looks like so:

<FooterTemplate>
<SeparatorTemplate>
<hr style="margin:0">
</SeparatorTemplate>
<asp:panel id="newQuestionPanel" visible="false" runat="server">
<asp:textbox id="newQuestion" runat="server" />
<SeparatorTemplate>
<hr style="margin:0">
</SeparatorTemplate>
</asp:panel>
<asp:Button ID="CollapseAll" text="Collapse All" runat="server"
onClick="collapseAll_click" AlternateText="Click here to see
details"></asp:Button>&nbsp;&nbsp;
<asp:Button ID="ExpandAll" text="Expand All" runat="server"
onClick="expandAll_click" AlternateText="Click here to see
details"></asp:Button>
<asp:Button ID="AddQuestion" text="Add Question" runat="server"
onClick="AddQuestion_click" AlternateText="Click here to see
details"></asp:Button>
</FooterTemplate>

The code the AddQuestion calls is:

sub AddQuestion_click(sender as Object, e as EventArgs)
newQuestionPanel.visible = "true"
end sub

But when I run this I get:
************************************************** **********
Compiler Error Message: BC30451: Name 'newQuestionPanel' is not declared.

Source Error:

Line 305:
Line 306: sub AddQuestion_click(sender as Object, e as EventArgs)
Line 307: newQuestionPanel.visible = "true"
Line 308: end sub
************************************************** *************

Why is not declared? It is declared in the FooterTemplate section, isn't
it?

Thanks,

Tom.
--
Daniel Fisher(lennybacon)
MCP ASP.NET C#
Blog: http://www.lennybacon.com/
"tshad" <ts**********@ftsolutions.com> wrote in message
news:eG****************@TK2MSFTNGP10.phx.gbl...
I am using the footer of my Datalist to add a row into my database.

Is there a way to make the footer invisible when not adding a row, making
it visible when a button is pushed and making it invisible again when
the page is posted (after the row is added)?

I have a footer such as:

<FooterTemplate>
<SeparatorTemplate>
<hr style="margin:0">
</SeparatorTemplate>
<asp:textbox id="newQuestion" runat="server" />
<SeparatorTemplate>
<hr style="margin:0">
</SeparatorTemplate>
</FooterTemplate>

Thanks,

Tom


Nov 19 '05 #3
Can't we use the ShowFooter property of the datagrid control the visiblity
of the control

Regards
Vikesh

"tshad" <ts**********@ftsolutions.com> wrote in message
news:eG**************@TK2MSFTNGP10.phx.gbl...
I am using the footer of my Datalist to add a row into my database.

Is there a way to make the footer invisible when not adding a row, making it visible when a button is pushed and making it invisible again when the page is posted (after the row is added)?

I have a footer such as:

<FooterTemplate>
<SeparatorTemplate>
<hr style="margin:0">
</SeparatorTemplate>
<asp:textbox id="newQuestion" runat="server" />
<SeparatorTemplate>
<hr style="margin:0">
</SeparatorTemplate>
</FooterTemplate>

Thanks,

Tom

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

82
by: Peter Diedrich | last post by:
The site design is pretty simple: ============================================ | Head | ============================================ | | ...
7
by: Xavier Onassis | last post by:
I would be grateful for recommendations for a CSS layout (header, 2 cols, footer) that can accomodate dynamically added elements. I am not having any luck so far getting this to work in...
67
by: Sandy.Pittendrigh | last post by:
Here's a question I don't know the answer to: I have a friend who makes very expensive, hand-made bamboo flyrods. He's widely recognized (in the fishing industry) as one of the 3-5 'best' rod...
3
by: John | last post by:
I have a report that's basically a calendar. I need to get a footer that shows the range of dates on the current page (a start date and end date). I know how to do that by putting a field in the...
5
by: Chamindu R Munasinghe | last post by:
Hi, I use the asp.net datagrid footer to add new records. In the footer I use a web user control to read a date. it is made of a text box, a required field validator and a compare validator. When...
3
by: Richard | last post by:
After printing a userlist to a Datagrid i want some names not to be shown. I want to know how i can make a entire datagrid row invisible. I suspect its something with the OnItemDatabound but i am...
13
by: Greg | last post by:
Most suggestions on this topic recommend to use a page footer and make it visible only on the last page. My problem is that the footer is half of the height of a page which means the detail would...
1
by: PDH | last post by:
I have sumation in my group footer that I would like to hide when the sumation = zero. I am relatively new to MS access and my current attempt involved the onformat and the following expression: ...
1
by: vsgsk | last post by:
In our asp.net 2.0 project, I have a huge page which handles lot of security related issues with some 30 to 40 dropdowns and many links. The left side content is the help text for the page whereas...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.