.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

Having trouble with App_Code...

Posted By:      Posted Date: October 14, 2010    Points: 0   Category :ASP.Net


I am working on an asp.net project in which I have the following code in my App_Code folder.

Namespace Shopping.Commerce

    <Serializable()> _
    Public Class CartItem
        Private _productID As Integer
        Private _productName As String
        Private _subItems As String
        Private _quantity As Integer
        Private _price As Double
        Private _lineTotal As Double

        Public Sub New()
        End Sub

        Public Sub New(ByVal ProductID As Integer, ByVal ProductName As String, ByVal SubItems As String, ByVal             Quantity As Integer, ByVal Price As Double)

            _productID = ProductID
            _productName = ProductName
            _subItems = SubItems

View Complete Post

More Related Resource Links

Trouble with UpdateProgress showing...


Recently I converted a project to VS.NET2010 and ASP.NET 4.0 (not convinced this is the problem, but regardless this is when the problem began) and now I am having an issue with an AJAX UpdateProgress showing. Here is the abrriviated code:

   <asp:UpdatePanel ID="UpdatePanelPostPageLoad" runat="server">
         <asp:Timer ID="tmrPostPageLoad" Enabled="false" Interval="100" OnTick="PostPageLoad_LoadData"
         <asp:Timer ID="tmrPostPageLoadPt2" Enabled="false" Interval="1" OnTick="PostPageLoad_LoadDataPt2"
         <%--Placing the UpdateProgress inside the UpdatePanel targeted--%>
         <asp:UpdateProgress ID="UpdateProgressPostPageLoad" runat="server" DisplayAfter="0" AssociatedUpdatePanelID="UpdatePanelPostPageLoad">
                       Updating blah blah....


Classes created inside App_Code dir is ignored by the compiler



I have the following problem programming in asp .net with visual studio 2008. If I insert a new class file, right clicking on "add new element -> class -> ecc..." directly inside the App_Code directory (or in its any subdirectory) the compiler and the smartTab do not see any custom namespace previously created in other classes, nor from other classes I can find the namespace and the class name defined within the new class file just inserted. The only way I found to correctly insert a new class file is create it right clicking on "add new element... ecc..." not in the App_Code (or sub) directory but rather in the root node with the name of the entire project, and then I can move it in the destination App_Code subdirectory, and it keeps working.

As a matter of facts it seems that is not important where the file IS but rather where I CREATED it: if I created a class from inside the App_Code it does not see anything and it is not seen by any other class, otherwise if I create it right clicking on the root node of the project it works and keeps workng even moving inside any subdir within the project.

I also tried to manually add the App_Code subdirs to the <Compilation> and <codeSubDirectories> tags of the Web.config file, but anything changed with this behaviour.

Does anybody know why?


Question about user used to execute code from app_code


 Hello. I would like to know something about code execution  in App_Code folder.

Under wich user executed code from app_code.

I'm using impersonate in web.config

Having Trouble Connecting to BDC


Hello Share Point experts,

For the first time I'm trying to connect to BDC in SharePoint. I created the Application Definition File and successfully uploaded it to the page. Here is the Authentication part of my ADF:

    <AccessControlEntry Principal="domain\admin">
      <Right BdcRight="Execute"/>
      <Right BdcRight="Edit"/>
      <Right BdcRight="SetPermissions"/>
      <Right BdcRight="SelectableInClients"/>
    <AccessControlEntry Principal="domain\admin">
      <Right BdcRight="Execute"/>
      <Right BdcRight="SelectableInClients"/>
  <LobSystemInstance Name="CRMDB">
<Property Name="AuthenticationMode"

Trouble with Font Definition in Accordion Control


 VWD 2008 Express.

I have a page on which I have an accordion control.  The accordion control seems to be overriding the font definition I have for the page body in my CSS stylesheet.  Here is what is happening.  Can anyone help?  Thanks.

1.  When I open the page and the top panel opens, it displays with the correct font family, size, etc.

2.  If I close and reopen the top panel, it displays with another font family and looks bad.

3.  All subsequent panels, when opened, display the font in a different family than specified in my CSS stylesheet.

This is what I have in the stylesheet both for the body and for the .accordioncontent:

    background-color: #E4E1C2;
    background: url(../images/background.jpg) repeat left top;
    font-family: Georgia, "Times New Roman" , Times, serif;
    color: #666666;
    font-size: 12pt;
    border-top: none;
    padding-top: 10px;
    font-family: Georgia, "Times New Roman" , Times, serif;
    color: #666666;
    font-size: 12pt;


APP_CODE problem


Hi guys,

      This problem has been bugging the hell out of me. I am using visual studio 2005 developer's edition and I have created a new empty solution by clicking File->New Project->Other Project Types->Visual Studio Sloution->Blank Sloution (This is a blank solution template). After that i add new porject by right clicking on the solution and Click on "New Project" and add "New WebSite". When I right click on the New Project that i added, and go to "add" ->"add asp.net Folder" -> I dont see the option to add "app_code" folder. Why is that ? When i do the same for the New Website that i added i could see all the asp.net folders in the same solution. If you could assist me on that that would be great. I could add the App_code manually but will that create any problems for me later on. Any explained help will be much appreciated. 



Visual Studio 2008: having trouble in opening any web page

hi alli am unable to run any web page in the browser that i design in visual studio..i didnt understand that what happened.As the visual studio was working fine and i can easily run my websites that i create in it but now i tried to run different pages in its internal browser,internet explorer,mozilla firefox but they give error(the error which we get when we are not connected to internet and try to open a url).Even i had tried to build a new website and run it but the problem is still..i cant figure it out thats why came here and posted.so can anyone help me out...

Trouble executing ASP.NET app on 64-bit server

Hi,I have an asp.net webapp that uses some unmanaged code and 3rd party pre-compiled libraries that I am pretty sure are 32-bit.  We developed this on a 32-bit machine with a 32-bit development windows server.  Now we are moving our web site to production where the box has Windows Server 2003 64-bit.  I was getting W3SCV errors about the framework at first:http://s18.photobucket.com/albums/b116/dtdono0/DOTNET/ISAPI_002.jpg I followed the instructions on this blog that talks about enabling the 32-bit version of ASP.NET: http://support.microsoft.com/kb/894435Now I get a new error and I cannot find any documentation on it.  http://s18.photobucket.com/albums/b116/dtdono0/DOTNET/ISAPI_001.jpgI looked up the error code 0x000000c1 and got the following:C:\Err>err 000000c1# for hex 0xc1 / decimal 193 :  SPECIAL_POOL_DETECTED_MEMORY_CORRUPTION                       bugcodes.h  SQL_193_severity_15                                           sql_err# The object or column name starting with '%.*ls' is too# long. The maximum length is %d characters.  ERROR_BAD_EXE_FORMAT                                          winerror.h# %1 is not a valid Win32 application.# 3 matches found for "000000c1"This really doesn't tell me much.  Any ideas?

trouble with statustrip not visible

for some strange reason the the stusstrip's toolstripStatusLabel got changed to invisble desipte my explicit effort in code to sensure it is visible , brought to front,. the statusstrip itself is visible however. Plateform: c# visual studio 2008 express on windows 7 coul it be I had in teh form: top panel top middle textbox dock=fill botton panel doc k= bottom adn has a textbox docked to its top and statustrip docked to the panel's bottom?

Trouble assigning properties for multiple CSS classes

Hi Can anyone tell me why the first block of CSS below works, but the second one doesn't? Thanks Block 1: (works) <style type="text/css">  .FB  {      margin-bottom: 0.5in;      margin-left: 0.5in;      text-align: left;      float: left  }  .FB  {      color: Black;  }</style> Block 2: (Doesn't work - all I get for FB is color: Black)<style type="text/css">  .SomeOtherClass, FB  {      margin-bottom: 0.5in;      margin-left: 0.5in;      text-align: left;      float: left  }  .FB  {      color: Black;  }</style>

Trouble With Team Foundation Server/Visual Studio 2010

Hi At work we are 2 guys on the same project. We both program in visual studio 2010. The other guy complains that he don't see my changes. I know this dude have already executed "Get Latest Version", despite that he don't get my changes. Some more information that may be relevant:Each time I've done some changes to the source code on my local computer, when I run the code breakpoints are not triggered. I get a message saying something about mismatch between different version of the source (or something like that, weeks sinece I saw that message). It's a while since I saw that message becasue I've found a work-around: Each time I've done changes tothe source code I do this:- Clean Solution- Rebuild (Release)- Rebuild (Debug) When I've done that I can see my own changes.. But the other guy have trouble with seeing my changes. I'm not sure how to fix it so that he see my changes. I checkin regulary so my changes should be available on the Team Foundation Server. Any help on this would be very helpful

trouble with foreign key

I have this statement that breaks due to a foreign key constraint. having a tough time figuring out how to get around it: delete   from Security_LoginActivity where   UserClientMetaDataId in ( select   a.UserClientMetaDataId from Security_LoginActivity a inner   join Security_UserClientMetaData b on a.UserClientMetaDataId = b.UserClientMetaDataId where   LoginTraceId is not null ) delete   from Security_UserClientMetaData where   LoginTraceId is not null and LoginTraceId < (   select min(LoginTraceId) + 50000 from Security_UserClientMetaData   where LoginTraceId is not null )   Error is: Msg 547, Level 16, State 0, Line 9 The DELETE statement conflicted with the REFERENCE constraint "FK_Security_UserClientSignature_Security_UserClientMetaData". The conflict occurred in database "ASPNETDB", table "dbo.Security_UserClientSignature", column 'UserClientMetaDataId'. The statement has been terminated.  qeqw

Trouble Activating a Solution on a new SP installation

This is a new Sharepoint 2010 server. I have uploaded a very simple solution wsp file and when I try to activate the solution in the Solutions Gallery - the Activate icon is grey-ed under the Commands Ribbon in the popup (entitled: Solutions Gallery - Activate Solution).  On hover over this icon it states that this command is inactivated.  The F2 extended help give a wide range of ideas mainly permissions. I should have full admin priviledges. We checked the services and anything that makes sense is running. This same solution will activate on my local test system - it is a simple visual webpart as a test. Since I am using the same browser for both local and this new server I do not think it is ActiveX. Thanks in advance for any ideas.  

Trouble Installing TFS 2010

    Sorry if i come off as a little bit irritated but i have had a hellacious week. I originally got MOSS 2010 installed with no problem. It installed SQL Server Express 2008 which i didn't like but at least i got it installed (i already have SQL Server Enterprise 2008 R2 installed on this machine).  I then tried to install TFS 2010 and had all kinds of problems. Originally i got some type of error like: [08/22/10,18:08:48] Microsoft Team Foundation Server 2010 - ENU: [2] ERROR:Error 1304.Error writing to file: Microsoft.VisualStudio.QualityTools.CommandLine.dll. Verify that you have access to that directory. Spent the better part of 3 days trying to figure out whats going on. Didn't get much help from the forums so ended up having to figure it out by myself. I uninstalled MOSS 2010 and still got the same error above. I had to remove the application layer ____ that the sharepoint installer installed but didn't remove when i uninstalled the product. I was then able to install TFS with no problem. So apparently sharepoint was blocking something. I then wanted to start all over again so i uninstalled TFS and now of course sharepoint won't install cleanly. I get the following error when trying to install: Error: Command: 'C:\Program Files\Common Files\Microsoft Shared\SERVER14\Server Setup Controller\dbwrap.exe' failed with error code: -2068643839. Type: 8:

Trouble getting my back/forward buttons to work correctly

My program has 4 pages that have session variables on each page and they are retrieved on the 4th and final page then submitted to a database when the submit button is clicked. When i was testing my program i filled out all 4 pages and then clicked back to refill-in something on a previous page and all my information wasn't filled out anymore. So i added the code in the page load sub btnBack.Attributes.Add("onClick", "javascript:history.back(); return false;") and this cured that problem so i could click back and the data would still be filled out. Then i saw a new problem....after i went back to fix something on previous pages 1 and 2, i would click the next button to go forward to pages 3 and 4 that i've already started filling out and now the data on those pages were cleared. So how do i make it so that the information from the whole program stays filled out whether i go back and forth from the 1st page to the 4th until i click submit on the 4th page? I have searched everywhere on the internet and cannot find a solution

Trouble With Calculated Member

WITH MEMBER [Promotion].[Campaign].[Program].[All Others] AS [Promotion].[Campaign].[Program].&[Acquisition]+[Promotion].[Campaign].[Program].&[Publications] SELECT [Measures].[Revenue] ON 0, [Promotion].[Campaign].[Program].ALLMEMBERS ON 1 FROM MyCube In the MDX above "Promotion" is the dimension.  "Campaign" is a user hierarchy.  "Program" is a level/attribute. I keep getting: Query (2, 2) The member '[Program]' was not found in the cube when the string, [Promotion].[Campaign].[Program].[All Others], was parsed. What am I doing wrong here?

Trouble importing strange column format report from Excel 2007 to SQL 08

Hi, I'm not sure whether this belongs in this section or the SSIS one so hopefully I've got it right!  Hoping someone will be able to help with a problem I'm having importing a report with header and detail rows from our antiquated POS system into SQL 2008 tables.  The reports export in Excel 2007 format and for each header row there can be one or more detail rows starting from column B.  As such I've tried several things such as openrowset, an Access 12.0 OLE DB source in SSIS and even COM automation of Excel to try and write a conditional split which will hold the header details in variables then write them to rows alongside the detail rows.  I've pasted a small sample of the data here as I wasn't able to attach it: 01/07/2010 @ 11:18 Page: 1 RECEIVING: Voucher Journal Sort: VC|Str|Vou Date|Vou #|Document SID Filter: Voucher Date: 01/06/2010@12:00a..30/06/2010@11:59p Include Item detail: DCS|Item#|Desc1|Attr|Material|Size|Qty VC Str Vou Date Vou # Qty ABC 001 15/06/2010 12345 38 E NN 66 200148 XXXXXXXX RED SHAD E NN 66 200149 YYYYYYYYY BLACK GO E PP 60 200154 ZZZZZZZZZ BLACK CDE 002 16/06/2010 13839 8 F SA 35 217500 XXXXXXXX Natural F SA FL 218674 YYYYYYYYY Chalk F SA WE 221462 ZZZZZZZZZ White FGH 001 21/06/2010 13905 3 F SH 85 126260 XXXXXXXX Navy IJK 001 23/06/2010 13914 3 E AA 61 250005 YYYYYY
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