473,480 Members | 4,282 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Placeholder control, C# SharePoint custom search box

Hi All,
I don't get too much in the way of responses from the
PortalServer.Development group, so wondering if any C# folks here are
familiar with SharePoint development.

Just trying to bang though a simple example in this great article.
http://msdn.microsoft.com/office/def...abouttheauthor

Working on the custom search box, an ASP.NET page:

Line 1 SearchBox sb = new SearchBox();
Line 2 sb.Title = "Search SharePoint from here";
Line 3 sb.CompactMode = true;
Line 4 sb.SearchResultPageURL = "CustomSearchResults.aspx";
Line 5 PlaceHolder1.Controls.Add(sb);

The PlaceHolder1 line 5 gives me the "The Type of Namespace
'Placeholder1' could not be found", and it underlines PlaceHolder1.

I have all my using statements in order. When I browse IntelliSense
though, I find the Placeholder control at:
System.Web.UI.WebControls.PlaceHolder so I don't see how the above
Placeholder1 line would work, especially since the Placeholder1 isn't
created as the SearchBox sb is in line 1.

Feb 16 '06 #1
0 4530

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

Similar topics

0
2258
by: Ken Wigle | last post by:
All, I am trying to add some .net applications I wrote to a virtual directory underneath the sharepoint services web site. I am having some problems and wondering if a) this is possible and/or...
4
8781
by: patrick_a | last post by:
Hello, I am trying to insert multiple instances of a custom user control into a placeholder on an aspx page, based on the records retrieved from the database. I use the datareader to loop through...
4
2542
by: blue | last post by:
I have a drop-down list, a radio button list and a submit button. I'm adding these controls to a table and I'm adding the table to a Placeholder. I'm adding it to the Placeholder because I don't...
3
1698
by: Michael | last post by:
Hi all.. I have a solution containing 5 projects, one of which is a custom control. In one of the projects, I dragged the .ascx file from the custom control project and dropped it onto a form....
1
1567
by: Amir Ghezelbash | last post by:
Hey every body; first off let me say thanks every body..this place is great i have never came here with a problem and left without an answer..you guys are awsome any way i had a question...
1
2354
by: R.A.M. | last post by:
Hello, I need your help with a problem of menu definition. Plase help, I have little experience. I have created custom Menu, which I want to put on a few .aspx pages: public class DemoMenu :...
2
3480
by: Vishal Gupta | last post by:
Hi all, I have a placeholder control on an ASPX page. I dynamically add a few button control and label control to the placeholder from code - all is well with the world. But on post back the...
0
1534
by: seigo | last post by:
Hello, I faced with the following problem. I have a PlaceHolder on a page and a few UserControls which have custom events, for instance: public delegate void SelectHandler(object sender,...
5
4375
by: studio60podcast | last post by:
I have an ASP:Placeholder and I'm trying to populate with Label controls from the code behind after a button click, essentially creating a list of selections. But each time I click the button,...
0
7037
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
6895
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5326
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,...
1
4770
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
4476
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...
0
2992
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2977
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1296
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
558
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.