473,383 Members | 1,929 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,383 software developers and data experts.

Getting contents of a PlaceHolder

I am attempting to add a drill down datagrid to my webpage so the user
will not have to leave the page to get further information on a row.

There are 12 other columns before this column.
<asp:TemplateColumn>
<ItemStyle Width="1" />
<ItemTemplate>
<asp:PlaceHolder ID="ExpandedContent" Visible="false" Runat="server">
</td></tr>
<tr>
<new datagrid goes here>

</td> </tr> </asp:PlaceHolder> </ItemTemplate> </asp:TemplateColumn>

Here's what I'm trying to do in the C# code. This should trigger when
the user clicks the +/- sign at the beginning of the row.
protected void Grid_ItemCommand( Object sender, CommandEventArgs e )
{
if ( e.CommandName == "Expand" )
{
ExpandedContent =
(PlaceHolder)this.ConfGrid.Columns[this.ConfGrid.Columns.Count - 1].
// PlaceHolder ExpandedContent =
(PlaceHolder)confGrid.Item.Cells[confGrid.Columns.Count -
1].FindControl("ExpandedContent");
ExpandedContent.Visible = !(ExpandedContent.Visible);
// ImageButton btnExpand =
(ImageButton)ConfGrid.Item.Cells[0].FindControl("btnExpand");
if (btnExpand.ImageUrl == "~/Images/Plus.gif")
{
btnExpand.ImageUrl = "~/Images/Minus.gif";
}
else
{
btnExpand.ImageUrl = "~/Images/Plus.gif";
}
}

I can't get the ExpandedContent to have a value. How to I get the
contents of the PlaceHolder into my variable.

Thanks

May 4 '06 #1
1 1144
Nevermind...I figured it out. I wasn't properly using the event
handler. All is good now.

May 4 '06 #2

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

Similar topics

2
by: Stephen | last post by:
I want to create a data entry form consisting of X rows of HTML input fields. X = number of rows that the user will determine when the web page is running. I was able to use an asp:placeholder...
0
by: Fraggle | last post by:
I am using PlaceHolders in a Repeater to generate a multi choice survey. I need a way of testing to see what the placeholder has been turned into at runtime, and reading out the data. The admin...
2
by: Mike Speak | last post by:
I have a user control that I want to use to render 4 menu items (retrieved from db) on the top of each of my asp.net pages. The user control defines a table, with one TR and one TD. Within the...
2
by: Wee Bubba | last post by:
the lower part of my page consists of a dataList along with other server controls and HTML markup. this is my data display section. the upper part of my page is a data entry section. what I want...
1
by: msnews.microsoft.com | last post by:
I'm adding multiple web controls to the placeholder controls collection, but even when doing the for each and recursion method of getting the web controls, I'm only getting the first web control...
4
by: Joo Park | last post by:
Hello, I'm trying to add a TextBox to a web page dynamically. However, the compiler is complaining that it needs to be place in a form. How do I get a reference to a form object so that i can...
3
by: Hitesh | last post by:
Hi, I am getting the response from another Website by using the HttpHandler in my current site. I am getting the page but all the images on that page are not appearing only placeholder are...
10
by: Neo Geshel | last post by:
I am seeking to hand-roll my own blog in ASP.NET 2.0 and SQLExpress 2005. Why? Because I can. Because I will gain experience. The one thing that has me stumped at square one is inline images....
1
by: Abhishek | last post by:
Hello All I am able to call the function exported by Exe from a dll file im getting the address of the function but whille calling that function im getting access violation Error as bellow my code...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.