.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links


Posted By:      Posted Date: September 27, 2010    Points: 0   Category :SharePoint

I wanted to include bestbets in osssearchresults.aspx page. I know that it is not possible to include webparts in osssearchresults.aspx since its not a webpart page.

So what are the workaround available?

1. Include a java script in osssearchresults.aspx page. but this will affect all the webapplication in that server. i dont want to affect all the web application.

2. its also not possible to remove the contextual search.

is there any other option to implement bestbets in (this site:Sitename) serach result.

View Complete Post

More Related Resource Links


Hi,Whenever i do search on This Site or This list my search results are redirected to OSSSearchResults.aspx page.Which is fine but i want to edit the page. Strangely i dont see EDIT PAGE option from the site action drop down. Can some one help me how to get EDIT page option on OSSSearchResults.aspx page.Thanks.Munna

Redirecting to my custom searchresults.aspx instead of Regular OSSSearchresults.aspx


Redirecting to my custom searchresults.aspx instead of  Regular OSSSearchresults.aspx..

Any way to redirect my searchbox to my custom searchresults.aspx page....

I created my custom new custom seachresults.aspx page, But my search box is not allow me to go my custom seachresults.aspx which in root(beside default.aspx of site)

i googled no related ans found

I am using moss2007

Code works on aspx but not ascx


Not sure which category to put this question in, so I will put it in here.

Just to give you an idea of the layout of my solution, I have the main project, along with 2 class libraries, BLL and DAL.  (Business Logic Layer and Data Access Layer)

The BLL refers to the DAL and the main project refers to the BLL.

I had a test website and the code worked fine, but the same code will not work on the real project. The only difference is that in the test project, the code was on an aspx code behind, whereas in the real project, it is an ascx code behind (Web User Control )

The code is:

Dim connectionString As String = ConfigurationManager.ConnectionStrings("ASPNETDBConnectionString").ConnectionString
        Dim recordEntry As New UserRecord(connectionString)
        recordEntry.UserName = "TestName"
        recordEntry.BMI = bMI
        recordEntry.BMR = bMR
        recordEntry.FTM = fTM
        recordEntry.TDEE = tDEE
        recordEntry.TodayDate = dateForToday

Dim connectionString As String = ConfigurationManager.ConnectionStrings("ASPNETDBConnectionString").ConnectionString

Create an API (aspx vs mvc)


Hi everybody!

I'm not sure if this is the right place to ask this, so, sorry if it's not. I have to create a web application. I can handle that. But, it has a requirement I've never done before. I need to create an API for that application, so other apps can get or set information from/to my webapp.

I've been searching a lot and still don't have a starting point. Seems that MVC is really good to do that, but I'm not familiar with MVC, so I would need a starting point. I was thinking to do it in aspx (Framework 4), but do not know how to do that with aspx either.

Can anyone help me to get started with this?

Thanks in advance

Launch CMD File From ASPX Page


My organization uses a CMD file to install updated files for a major enterprise application. Currently, we send out an email to users with a link to the file and instructions to run it, BUT inevitably users don't update their machines until their in field and try to start the app.


We're now liking the idea of using an ASPX page to prompt the users to run the updates and to capture the fact that the updates have been run. I realize that we can't capture the success or failure of the update. But we'd like to capture the user accessed the page.


Is it possible to embed into the markup for the page a link to the file on the local intranet that the users can click on to run the file?

The user accessing the page would capture that they did just that. We'd deal with wether or not the update was actually installed or if it failed later with them directly.

Custom views on .aspx webpage


Hi again, i have a client that needs me to create a custom view on thier webpage similar to Microsoft Word.

It goes about that, when I click on an image it redirects me to another page and must create a custom view for a certain paragraph on that page. I am not sure how to do this and wonder if anyone knows how.

I am using C# programming language if that helps at all. I Heard that using javascript would work but i dont know javascript yet so is there any alternative?

Visual Studio closes itself by opening aspx-Page designer after Windows Update


Hey Guys,

I've a problem with my Visual Studio.

On the 13th of August 2010 i installed a Windows update on my vista sp2 pc. For this date my Visual Studio 2008 sp 1 always has closed itself by opening an aspx-page in designer view. There is no error message just closing the window. I restored a backup of my windows from the time before updating it and it helped, i could open aspx pages in the design view till the update has been installed again automatically after rebooting the pc. I can't disable windows updates, cause it's my pc at work and safety is very important. I hope you could help me out of this disaster.



Composite Control which contains arbitrary content defined in .aspx of parent and thier ViewState


I want to write own control which can contain other. And I want to define content of the control in the .aspx file where the control is defined. I have written such control. But now I have issue with ViewState of inner controls of my control. The following samle illustrates the issue: I defined two asp:DropDownList ID="ddl1" and ID="ddl2" One of them is inside of my control and other is outside. When posback is occurred asp:DropDownList ID="ddl1 loses state and becomes empty. How to say ASP.net to store state of inner controls defined by this way?


<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MyControl.ascx.cs" Inherits="DynamicControls.Controls.MyControl" %>

<div class="box">
    <div class="Header-Left">
        <div class="Header-Right">
            My Control
    <div class="Content">
        <asp:PlaceHolder ID="contentPlace" runat="Server" />

Migrating ASP to ASPX.... where to set 301 redirects


Hello, I'm updating around 15 pages from .asp to .aspx (.net 2.0)

My question is, do I have to put a header redirect 301 (permanent redirect) on each old file, or can I put it in global.asax file with a case checking for any of the 15 files?

I some tries to go to old.asp will it execute global.asax anyway?

What would the best aproach be?



Integrating aspx page in classic asp web application



I have a classic asp web  application. I am trying to add an aspx(C#) page to the existing asp application.

The existing asp pages have include pages for header and footer. How to add the classic asp include files in aspx page.

Also, How to deploy the aspx page in the existing classic asp web application.

Thank you

>>>How to use javascript function in aspx file?



I have a file util.js and there some funtions in same file.

For example functions name are keyUp, keyDown, isNumeric, isAlphaNumeric

I have used these functions in aspx code behind in a textbox to restrict user that he may not be able to input any special character.

Before, I used the code directly in aspx file but I have do it for different textboxes therefore to avoid much coding in aspx file I created util.js and put all code in this file but how to use these particular functions in aspx file I couldn't find the way.

Anyone have idea. Do share with me.

I used the reference like this:


' Font-Names="Verdana" Font-Size="8pt" Onkeyup= "keyUp(event.keyCode)" Onkeydown="return isAlphaNumeric(event.keyCode);" onpaste="return false;">

Delete not working on List.aspx - out of box



I'am trying to use Dynamic data web site on my project. I have Visual Studio 2010 enf Framework 4.0. I create the default project with the wizard. I add my own Entity Data Model.

When I try to use the "delete" autogenerated button on List.aspx, on the table ServerSetting (see image below), I receive a null exception.  I have no custom code involved in this operation and cannot seem to determine what is Null.

Any help would be appreciated!



[NullReferenceException: Object reference not set to an instance of an object.]
   System.Data.Objects.Internal.ForeignKeyFactory.CreateConceptualNullKey(EntityKey originalKey) +30
   System.Data.Objects.DataClasses.EntityReference.NullAllForeignKeys() +722
   System.Data.Objects.EntityEntry.NullAllForeignKeys() +235
   System.Data.Objects.EntityEntry.Delete(Boolean doFixup) +77
   System.Data.Objects.EntityEntry.Delete() +9
   System.Data.Objects.ObjectContext.DeleteObject(Object entity, EntitySet expectedEntitySet) +169

How to use a drop down list to edit in the standard Edit.aspx with DD?


Hey All,

I'm brand new to Dynamic Data and to ASP.NET.  I've been able to fumble around and get the calendar extender up and running and a few other customization options implemented, but I can't seem to get this drop down list to work - even after reading tons of online info.  The good news is that my web page/application is VERY simple, so hopefully you guys can help me out.  I'm working in VB btw.

I have a list of road projects submitted to me by local governments.  One of the fields is SponsoringAgency, which has a limited number of possible entries (the names of member governments).  Thus, when they submit a new project, or edit an existing one, I want to limit the input into the field "SponsoringAgency." I'm trying to use a dropdownlist because I'm familiar with it from Access, but it may not be the best approach.  Imagine you just setup a brand new, standard DD website, how would you get this to work?

Methods tried and failed (probably because I don't understand them fully):

UIHint - The closest I can get with this is an error saying that since SponsoringAgency isn't a Foreign Key, I'm out of luck.

Creating a SponsoringAgency Table - In my data layer, I created a second table with a list of government names.  I then tried se

Flash player doesn't send cookies while requesting an aspx page



 I'm developing a web-site, that uses SWFUpload for multiple files upload to the server. Page, that uploades files, is accessable only to registered user. Authentication is done via web-forms (authentication mode="Forms" in Web.config). Flash uploades files to special web page - upload.aspx. In IE everything works great, but Flash player in non-IE browser (in Firefox, for example) does not send any cookies to upload.aspx. Because of it no sesion and no authentication information is available in this page.

 I can pass all the information, necessary for uploading, in GET-parameters, which upload.aspx recieve. But this is a serious security hole and I don't want to expose session information. I can pass session identifier in GET-request. But the question is the following: how can I restore session information from the session identifier? How can I make HttpContext.Current.User point to currently logged in user in this case?

Any help will be appreciated.

Access Classes in an aspx page that is in folder in asp.net


I have classes in App_Code:
Connection.cs, ClientData.cs ....

I have a folder Authenticated within it have an aspx page Client.aspx

How do I access the page through Client.aspx ClientData.cs the class, because there is a mistake for me to define the class as I do, please help me!

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend