View Complete Post
I'm testing a MOSS2007 --> SP2010 migration - took a backup of a site collection db, attached it to the new SQL server and ran test-spcontentdatabase against it. it reported several custom webparts as not being installed on the new farm. I
deleted the pages containing those webparts from the production MOSS sites, and then deleted those pages from the recycle bin - but test-spcontentdatabase still reports those webparts as being referenced. Searching the database directly does find references
on the pages I deleted in the WebParts table. When I join the WebParts table with the AllDocs table I see the deleted pages referenced - but they don't exist (that I can tell) either on the site or in the recycle bin.
How can I get these items out of the report?
I have a class in my App_Code folder called Order. On one of my pages I am trying to create two different orders using this class.
Private Order1 As Order
Private Order2 As Order
Sub Page_Load(ByVal Sender As Object, ByVal E As EventArgs) Handles Me.Load
Dim CartID As String = "4525543"
Order1 = GetOrderFromDatabase(CartID)
Order2 = Order1
Order2.Shipping = 3
Order1.Shipping = 2
When I run the page each of the Response.Write statements ouputs a 2. But this is not correct. One should be 3 and the other should be 2. Does anyone know why this is not working?
I have a class in my App_Code folder called Order. On one of
my pages I am trying to create two different orders using this class.
Private Order1 As Order
Private Order2 As Order
Sub Page_Load(ByVal Sender As Object, ByVal E As EventArgs) Handles
I've tried setting the <pages pageBaseType="DynamicWebPage" /> value in web.config, but when I response.write out the page type, I'm still getting Microsoft.WebPages.WebPage.
I'm simply trying to sub-class WebPage and add some additional functionality such as a dynamic PageData dictionary similar to Phil Haack's dynamic ViewData dictionary.
using EF3.5sp1 for a project, and I've been working around many of its
problems... as such, my entity partial classes have a lot of logic in
them for change-tracking and whatnot. Obviously, I'd like to factor
this logic out into a common base class,
but of course all my objects must derive from EntityObject. Is it
possible to tell them to derive from some class of my own invention
(which would actually likely derive from EntityObject themselves)?
I'd rather avoid editing the EDMX file unless the changes will be
safe on entity-model-update, since I'm still making changes to the
database schema in this early state of my project.
Also, is there any good workaround for the fact that the change isn't tracked when you change EntityReference.EntityKey?
This is frustrating, and I don't know how to solve it.
I have a strange problem. I am adding a LinqDatasource object, and set the context:
protected void LinqDataSource_ContextCreating(object sender, LinqDataSourceContextEventArgs e)
e.ObjectInstance = new KaruselaDataContext(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
Then I get this error:The type 'System.Data.Linq.DataContext' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Linq, Version=220.127.116.11, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
On web.config I already have this:<add assembly="System.Data.Linq, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
NOTE: The datacontext is in a different project (DLL proect) where I added a refernce to System.Data.Linq.
is there another way adding a refernce to a web project? or only though teh web.config?
I know what Singleton Pattern means and Abstract class means.
What I wanted to know was how would this apply to real world.
Could anyone give me any good example or simple explanation.
Say I have a simple website, why would I use any of the above if any.
Why would it simplify my architechture.
Thanks in advace.
I created an application and implemented IHTTPHandler for all incoming request ending with ".aspx" extension.
Under "ProcessRequest" module, I am creating an instance of HttpContext (with URL attributes different from my application's URL i.e. if I am working on localhost then speciying Yahoo.com as its URL) and assigning it to "context" which comes as method argument.
After redirection, an error is generated. Also, the custom HTTPContext is not passed to the requested page (default.aspx, in my case.)
Code is as follows.
Public Sub ProcessRequest(ByVal context As System.Web.HttpContext) Implements System.Web.IHttpHandler.ProcessRequest
Dim requestedUrl As String
Dim targetUrl As String
Dim urlLength As Integer
'Save settings which will be used while redirecting to appropriate page
requestedUrl = context.Request.RawUrl
If requestedUrl.IndexOf("?") >= 0 Then
targetUrl = requestedUrl.Substring(0, requestedUrl.IndexOf("?"))
targetUrl = requestedUrl
If targetUrl = Nothing Or targetUrl.Length = 0 Then
targetUrl = requestedUrl
I hope this is the right place to ask this question.
I'm trying to make a control class library. I want to have a GenericHandler as a WebResource so I could call it from the web project that will use that control.
I need this handler will get parameters from the query string and return JSON data acourding to what it get in the QS.
I know how to create JS and images WebResources, so I tried the same on a generic handler I added to the class library project but all it does is return the source of the handler file and not the result.
Is what I'm trying to do possible? If so, what should I do?
I wrote a class to pull adinfo and for the life of me I can't seem to figure
out why it says "Invalid Login Name" no matter what I type in. If I leave
it blank it seems to work properly but it doesn't seem to be actually searching
the AD. I'll drop the whole class here, it's being initiated by a button click
on an outside form.
Thanks in Advance for any help Offered,Postholes
Public Class LoginButton
Dim UserID As String = Nothing
Dim DomainDN As String = ConfigurationManager.AppSettings("myConnectionString")
Dim ADEntry As DirectoryEntry = New DirectoryEntry(DomainDN)
Dim objSearch As New System.DirectoryServices.DirectorySearcher(ADEntry)
Dim oResults As DirectoryServices.SearchResultCollection
Dim oResult As DirectoryServices.SearchResult
Dim RetArray As New Hashtable
Dim page As Page = DirectCast(HttpContext.Current.Handler, Page)
Dim TextLogin = DirectCast(page.FindControl("
I have a class library called WEM.portal which used Resource files to localise text in my composite controls.
I store my resource files (eg MyResourceFile1.resx) in App_GlobalResources folder and then refer to them using
MyLabel1.text = My.Resources.MyResourceFile1.MyResourceKey1
This is all working ok until I create seperate files for each language such as MyResourceFile1.FR-fr.resx.
I have implemented this throughout my other web applications but the Class Library doesnt seem to want to work the same way
When I load the page it correctly showes the resourced keys which I have done through the web application BUT the resource keys in the composite controls does not seem to pick up the culture code.
Am I missing something stupid. Ive tried
Here is the page directive for the page that throws the error:<%@ Page language="c#" Inherits="University.AspNet.Index" CodeFile="Index.aspx.cs" %>The code behind file Index.aspx.cs starts like this: