VS 2010 - Listing Gives Error

Apr 10, 2014

I have a method who return list of data from database. i want to know how we can get value from list which is return by method.

public List<Company> GetCompanyInfo (int CompID)
{
db_CompanyDataContext obj_comp = new db_CompanyDataContext();
var Compnay_Info = from Cinfo in obj_comp.Companies where Cinfo.CompID == CompID
select Cinfo;
return Compnay_Info.ToList();
}

i am trying below mention statement but it gives error.

List<Company> cmp = sm.GetCompanyInfo(qry).ToList();

View 3 Replies


Similar Messages:

Web Forms :: Directory Listing Denied / Getting Error

Jan 2, 2010

I have installed blogengine and dasblog in my system.when i try to open those pages i get the folloeing error in ,my web browser

Directory Listing Denied

This Virtual Directory does not allow contents to be listed.

View 3 Replies

Seeing The Actual Error Behind 'An Unexpected Error Has Occurred' In Sharepoint 2010?

Aug 4, 2010

In MOSS 2007, we could update the tag's callstack attribute to true and then customerrors mode to "Off" to see the actual error behind the 'An unexpected error has occurred' message. Does it apply on SharePoint 2010 as well ? I tried it but I get the following error:

Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed.

Details: To enable the details of this specific error message to be viewable on the local server machine, create a tag within a "web.config" configuration file located in the root direc...

View 4 Replies

FTP Recurse Directory Listing?

Feb 12, 2010

has anyone got any pointers for recursively listing the directories and file structure within an FTP space with the built in .NET FTP client, ideally I would like to bind the results to a tree view at once.

View 3 Replies

MVC :: Dynamic Listing Of Data Collection?

Oct 5, 2010

I'm trying to achieve a dynamic contact lists/info. > From the Left Column, it may contain three hyperlinks that could update the list of contact lists for a specific department office. And on the Right column, I'm planning to have a loop over the data view collection from a Model(e.g. Contacts) that will be displayed after selecting any of the hyperlink from the left column.

View 2 Replies

Directory Listing Displayed Rather Than Webpage?

Mar 11, 2010

I've just started developing a web site in VS 2008. When I try and view the page (click 'start debugging') an IE window pops up displaying a directory listing of all the files in my web application directory rather than my masterpage or content. Why is this and how can I correct it?

View 2 Replies

Security :: Listing Logged In Users - VB.NET Membership?

Jul 2, 2010

I used [URL] as a guide and have something configured to show me the users which are logged into the system. This uses the aspnet_Users.LastActivityDate column to see when someone last did something on the system. It also uses the userIsOnlineTimeWindow within the web.config to determine whether a user is online or not.

But because of this userIsOnlineTimeWindow limitation of .NET, even when someone logs out of the system or closes their browser window, the system still sees them as being online. Also, if they are on a page and don't do anything for 10 minutes, the system will show them offline until they refresh their page or go to another page. know of a better, more real-time way to tracking users which are logged in, logged out, etc?

I don't want to wait 10 minutes for the system to show that a user is offline and also if there's 10 minutes of inactivity, it shows them being offline.

View 1 Replies

Security :: File Listing And Session Modification?

Oct 18, 2010

I have started to get confused with the setting and security issues of asp.net. Hope someone could answer me. Problem 1: I am curious why we have to encrypt connection string, appsetting and more in the web.config file even though file listing is set to "not allowed" on server setting. Does it mean some strangers can still view and steal such file from server? Problem 2: I know that session id is sort of protected but could
hacker be able to change the information inside ? Let say hacker browser my webpage and some data are stored in the session cookies, could they change the information inside the session cookies?

View 1 Replies

Create A Career Listing Page For Website?

Oct 14, 2010

I am looking to create a Career Listing Page for my website. Anyone have any idea where to start or if there's some suedo code out there?

View 2 Replies

C# - Importing A Spreadsheet Into Program And Listing The Worksheets?

Apr 5, 2010

I have to import the contents of a spreadsheet in my asp.net project. The code behind is c#. how to locate the spreadsheet on the user's computer and how to import the data from a given worksheet into a datable. The problem is I may not know the name of the worksheet ahead of time. How do I present the user with a list of available worksheets and have them pick one?

View 2 Replies

Web Forms :: Listing Two SQL Columns Within The Same Drop Down List?

Apr 20, 2010

I am having trouble listing two columns from a SQL database into a DDL. I dont want to concatenate them but just want to list them down as a list in the DDL.Here is the code for the DDL which currently is concatenating the two fields:

<asp:DropDownList ID="DropDownList10" runat="server"
DataSourceID="SqlDataSource3" DataTextField="Vendor_Name"
DataValueField="Vendor_Name"

[code]...

View 7 Replies

IIS Configuration :: How To Hide Directory Listing In Server

May 7, 2015

How can I hide the directory listing in web-browser?

View 1 Replies

Security :: Successful Login Redirects To Directory Listing?

Oct 5, 2010

I have set the destinationpageurl of my login control to login.aspx. On successfully logging in to my website, I get redirected to the directory listing. Why is this? What am I doing wrong?

Also, what do I need to do to not allow the user to see the directory listing ever.

View 2 Replies

Forms Data Controls :: Listing All Files In A Folder

Mar 23, 2011

I am trying to tweak a ASP intranet website that was created for my company. It uses a control to show all files in a folder, so they can be selected with ease by our employees. What I would like to do if possible is set it up where if a new form is added a bubble notification will appear next to the tabbed section. See the image below to see what I am refering to. I spoke to our site designer and he stated it is not possible. I feel that with all the creative minds in the world anything is possible. [URL]

View 2 Replies

C# - How To Sort The Grid View Whose Column Is Listing Integers

Feb 17, 2011

I am sorting the grid using DataView's "Sort" property. I am passing sort expression and the order in which the grid is to be sorted(ASC or DESC). But the problem is, since the column on which I am sorting the grid is listing the intergers, the sorting is happening as if it is a string. But I need integer sorting rather string sorting on that column.

The grid displays below as ascending order(string sorting)
55
77
8

But I need the columns to be displayed like this(Integer sorting)
8
55
77

View 2 Replies

Web Forms :: Directory Listing Without Showing File Extension?

Nov 1, 2010

I've seen various tutorials and scripts online which show how to create a directory tree which list the file name, size etc.My question is, I need a script that is basically a normal directory listing but it doesn't show the file extension. If anyone can even point me in the right direction it'd be of much help!

View 28 Replies

Getting Error After Upgrade To 2010 .NET 4?

Feb 17, 2010

I am getting an error mesage about my membership I have included System.Web.ApplicationServices

Error 2 Type 'System.Web.Security.MembershipUser' in assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has been forwarded to assembly 'System.Web.ApplicationServices'. Either a reference to 'System.Web.ApplicationServices' is missing from your project or the type 'System.Web.Security.MembershipUser' is missing from assembly 'System.Web.ApplicationServices'. C:Users###DocumentsVisual Studio 2010JobTrackerusersNewJob.aspx.vb 82 29 C:...JobTracker

do I need to amend my web.config file

View 1 Replies

Web Forms :: Can Use The Next And Previous Buttons And The Ddl Listing Of Pages, Depending On The Search

Feb 22, 2010

I have a problem, i have a gridview populated with items and in the pager i have controls for previous and next and a dropdownlist that shows the total number of pages. I also have a search function to search for item.

if i for exemple search for *egg* i get a number of results and the ddl is populated with total number of pages for the searchterm. but if i click on the button for "next" the search result disapear and i get all the pages back (because of the postback) but how do i do to keep the state of the īsearch so that i can use the next and previous buttons and the ddl listing of pages, depending on the search?

View 5 Replies

Web Forms :: Listing Files Inside A Directory, Iis7 Forcing 404?

Nov 3, 2010

I have some issues regarding listing images from inside a directory. What I want to do is to create a Default.aspx page that will search and list the images located inside a folder of my website (where I simply drop them in it). I tried with a treeview, DirectoryInfo and both worked when I compiled my website with visual studio, but when I access them via another computer, I get a 404 for the page. My bet is that iis7 is blocking my code from accessing the folder containing the images. Any idea of how to fix this and make it work ?the code I use to browse in my image folder

string path = AppDomain.CurrentDomain.BaseDirectory;
DirectoryInfo diFiles = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory + @"contentmiscimages");
foreach (var f in diFiles.GetFiles("*.jpg"))
{
Lit.Text += "<a href="" + f + ""rel="lightbox[img]" title=" + f + ">" + f + "</a>" + "<br />"; //I format the image as an url inside a literal
}

View 1 Replies

Jscript Error After Upgrading To 2010

Jul 30, 2010

I have a webform that has a formview (fvwContract) and inside itemtemplate there is a Tabcontainer with three tabs (invoice (spanish: factura), receipt (spanish: recibo) and beneficiary (spanish: beneficiario). I have another formview inside invoice tab (fvwFactura) with many textboxes that I need to manipulate in code behind. The thing is that I canīt reference any of them like the following:

protected void DropDownList1_SelectedIndexChanged2(object sender, EventArgs e)
{


AjaxControlToolkit.TabContainer container = (AjaxControlToolkit.TabContainer)fvwContract.FindControl("TabContainer1");
[Code]....

how to reference any control inside frwContract.TabContainer1.fvwFactura?

View 1 Replies

Configuration :: Error With VS 2010 Web Application

Sep 30, 2010

we recently converted our web application from VS 2008 to 2010 and i am getting following error most of the time, both in my local machine (windows 7) and test server (windows 2003 server). Could not load file or assembly 'VJSharpCodeProvider, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) I already wasted a lot of time on this and it is stalling me to move ahead and do further development.

View 1 Replies

Configuration :: Error When Run App In VS 2010 Ultimate?

Nov 25, 2010

I have upgraded my app from c# 2.0 to 4.0 framework, it run without error. But when i copy the solution to another computer un VS 2010 Ultimate as well. when i run my project (f5), it genarate an following error:

correct before proceeding (You might rename the current web.config or add new one.)

How can i fix it?

View 4 Replies

VS 2010 - Parser Error In Subdirectory

Jul 7, 2011

I need to add a small training page to an existing website structure. I created a new project and published it to a subdirectory of the website, but when I run it, the .aspx pages throw a parser error because it's looking for the codebehind files in root/bin instead of root/subdirectory/bin. How can I make it look in the right folder?

View 1 Replies

WebMatrix :: Publishing Folder And File Listing In Stead Of Home Page

Mar 9, 2011

I have sucessfully published a couple of WebMatrix sites withour a problem but this time I'm stumped. When I try to visit the new site all I get is a directory listing of my files and folders. The home page does not show.

View 4 Replies

Web Forms :: Simple Server Control To Produce A Report Style Listing?

Feb 1, 2010

I currently have a gridview that is displaying tabular data from an sqldatasource that looks something like this:

[code]....

Since I have an unpredictable number of categories coming from the database, I would like to continue to use a single datasource with only one query to the database. There is no editing, it is simply for display purposes. What's the simplest way?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved