.net Have Circular List Collection?
Jan 5, 2010
want to create a list representing a list of valid locations on a grid. Items can only be stored in these valid locations and I want to locate the "next available" valid location. If I do this with a traditional list I have to deal with the end of list conditions. A circular list collection would make this a bit easier. Is there such a collection in .net?
View 3 Replies
Similar Messages:
Feb 1, 2011
List<Dictionary <string,object>> I am reading about the list and collection, If possible, what are the different ways that I can utilize the list of dictionary collections..... gives me different examples or areas where I can use it.
View 3 Replies
Apr 22, 2010
I have class like
public class ProgressBars
{
public ProgressBars()
{ }
private Int32 _ID;
private string _Name;
public virtual Int32 ID {get { return _ID; } set { _ID = value; } }
public virtual string Name { get { return _Name; } set { _Name = value; }}
}
here is List collection
List<ProgressBars> progress;
progress.Sort //I need to get sort here by Name
how can I sort this collection by Name?
View 3 Replies
Jan 29, 2011
I have this program in which I am trying to store a collection of values into a list and session
Example:
valueCollection = (List<Values>)Session["Value"];
I want to do the front end in a way which will show a table with each row showing a label and textbox. This would be too simple to do obviously but I want it to show 4 rows of the table by default and then the user can select "add another" this will then add another row onto the table with a label and textbox exactly similar to the 4 default. Everytime the user selects "add another" the table increments by 1.
View 1 Replies
Nov 9, 2010
How to setup a multi value dropdownlist from a list collection...
Datasource: Listcollection which contains ColorCode and Description...
how to I setup a dropdown with Colorcode-Description like ORG-orange...
then how to capture these selected value as colorcode only by removing description for update purpose...
Now I am doing like this...
ddl.datesource=list ...contains (colorcode, description)
ddl.DataTextField = "ColorCode";
ddl.DataValueField = "ColorCode";
ddl.databind();
then selected value should be like this...
ddlcolor.Items.FindByValue((DataBinder.Eval(formView1.DataItem, "colorCode").ToString())).Selected = true;
for update:
ClassA.Color= ddl.selectedvalue();
Now what I need change to in the above code to get the combination of both..otherwise i need have textbox for description which syncs with ddl..which is bit complex for my level of programming.
View 1 Replies
Jun 10, 2010
I created user control. It has string[] public property (it may be List<string> or whatever). I want to support defining this property in aspx code, when declaring the instance of this usercontrol. Something like this:
<uc1:MyControl ID="MyControl1" runat="server">
<MyStringCollectionProperty>
<string>My String 1</string>
<string>My String 2</string>
[code]...
View 3 Replies
Apr 9, 2010
We need to create a simple web service in ASP.NET that can be called from PHP or other languages. This in turn will be used to update records in a database for an item submission.
The core part is fairly simple, we have a base set of fields for the object - first name, last name, birth date, city, etc. In addition however we need to accept a list of items associated with that object that can range from 0-n.
Jan 1 2009, ABC
May 1 2010, 123
Jun 30 2010, XXXXX
What would be the best way to structure this so it can be easily passed to the ASP.NET web service and processed as a single call for the entire object? Would passing the list of items as a single delimted string be a wise approach? Ex: Jan 1 2009, ABC|May 1 2010, 123|Jun 30 2010, XXXXX
View 1 Replies
Jan 29, 2010
I'm using forms authentication in my C# based web site, with the authentication defined in web.config files in the various folders/sub-folders. I want to write a generic administration menu system, that lists all of the admin pages that the use is authorized to open. As I add pages, I want them to automatically show up in the menu. I need to obtain a list/collection of all pages that the active user is authorized to open. Is this possible in ASP.Net 3.5?
View 2 Replies
Jul 7, 2010
I have a list item collection. How to add this list item collection to a datatable.
The list item collection has the following fields:
Student Name, Maths Mark
John 20
Mac 30
John 35
I want to create a html table from the data table, which is grouped on the Student Name field.
View 2 Replies
Mar 7, 2010
I was building an application for a project with .NET 3.5 and I noticed a weird behaviour of the List.Add method:
I have built my own class to organize data pulled from a database, and I use a while cycle to iterate through it.
However, when I List.Add(item), the whole content of the list is substituted with the last content pulled.
An example:
Suppose you have 3 users in a DB, each one identified with an ID and a username:
| ID | username |
| 1 | John |
| 2 | Fred |
| 3 | Paul |
and you have a "Users" class defined as
public class Users
{
private Int32 iD;
private String username;
public Int32 ID
{
get { return iD; }
set { iD = value; }
}
public String Username
{
get { return username; }
set { username = value; }
}
}
So you write this function:
[... SQL definitions - sdr is a SqlDataReader ...]
List<Users> userlist = new List<Users>();
if (sdr.HasRows) //There are users
{
Users user = new Users();
while (sdr.Read())
{
user.ID = sdr.GetInt32(0);
user.username = sdr.GetString(1);
userlist.Add(user);
}
}
What you expect (I expect) is userlist containing:
| ID | username |
| 1 | John |
| 2 | Fred |
| 3 | Paul |
What I actually get is, instead
| ID | username |
| 3 | Paul |
| 3 | Paul |
| 3 | Paul |
View 3 Replies
Mar 11, 2011
I have a gridview in which dtasource binded is a List which returns class type. If no records in list, I want to display 'No records found' in GridView.
[code]...
In else part, what code i have to write to get desired output?
View 3 Replies
Aug 22, 2010
I need to cache System.Collection.Generic.List object with expiration time
var Root = from feed in feedhotel.Descendants(ota + "HotelContent")
where (feed.Attribute("HotelCode") != null)
select new xmlhotel()
{
};
return Root.ToList();
Is it possible to cache Root.ToList() for some time....
View 1 Replies
Oct 22, 2012
I need a list to export in excel and i need the following to achieve in the exported excell
- I need the header of the excel with font bold and size should be 14px of font.
- Other Cell try should be 12px of the font
- Right align the particular column in the excel
View 1 Replies
Feb 15, 2011
I am trying to return an Entity Framework 4 object with children to an jQuery JSON AJAX function but I get a circular reference error - in short my method looks like this
[WebMethod]
public static JSONObject Get()
{
WebHelper.JSONObject lJSONObject = new WebHelper.JSONObject();
lJSONObject.Object = Repository.Parent.Include("Child.Child").FirstOrDefault();
return lJSONObject;
}
if I do not include children the functions works fine, but with children the circular reference occurs.
View 3 Replies
Feb 12, 2010
When I re/build my ASP.NET website I do not receive any errors. However when I PUBLISH the site, it gives me a 'Circular file references are not allowed.' error.
I read a little on the web about this, and it provided a batch='false' option, which I tried and does nothing.
The page, has a master page, which may call on the same control twice; however, this control does not refer back to anything
View 1 Replies
Jun 28, 2010
When I try to depoly my web project then it throws an exception as "Circular References not allowed" Those are two same exceptions for my template.master and Forummaster.master file. When I build my code then very rarely it throws an exception but I can not deploy my web project because for deployment everytime it throws same exceptions at the time of building web project for deployment.
View 1 Replies
Mar 31, 2010
I am trying to create a set of WCF web services for an existing website that uses web site instead of a web application project. I would like to create a DLL that I drop into the Bin folder instead of writing all my code inside the App_Code directory. Ideally, I want to create a project and reference it from the web site, but I am running into a difficult situation.
The DLL will need to reference configuration and other DLLs located inside the bin folder of the website causing a circular reference. How do I get around this issue?
View 3 Replies
Jun 7, 2010
I have a service layer with a logger class
Service layer references DAL for Logger class to get its email credentials to use while sending email for critical log items.
I want to use this logger inside the DAL since there is stuff that needs to be logged there also - but with my current architecture I cannot.
I see this could somewhat be handled via IOC but my concern with that is if that way I will be addressing the root of the problem, or hiding it using another layer of abstraction.
View 1 Replies
Jul 26, 2010
I have a list of objects that I want to bind to a gridview. Creating that list and binding it works fine for most of the public properties in that list.
There are some objects contained in each of those objects... for instance there is an Address object.
object.Address.Line1;
object.Address.Line2;
When I bind this to my gridview, I have no issues with stuff like object.DateRegistered, but how can I access things like object.Address.WhatEverProperty? I always get this error:
"A field or property with the name 'xxx.xxxx' was not found on the selected data source."
View 7 Replies
Sep 10, 2010
Is there any way i can create circular pie chart instead of regular pie or a dougnut pie inside a doughnut pie main intention of having it is,i would like to have 5 diff circles in a pie(assuming 5 circular layers with 5 diff colors,with green as outer circle beginning is life and ending with red as death),i would like to make a chart such that..i can display the particular technology is in particular stage...i need to point in the report.
is that possible with SSRS or anyway...asp.net reports or any other 3rd party controls...
View 4 Replies
Feb 15, 2011
I have to show progress graphs exactly in following way where percentage would be in center of circular graph.How can i do this using javascript/jQuery?Can it be done using Google Chart?
View 2 Replies
Apr 19, 2014
i want to check my collection so i can add a new customer as long as the username does not exist in the collection i do not want 2 customers to be able to have the same username.
i have been trying many different things to try to get this to work but i am not exactly sure what i should be doing I have a aspforum and collection C# class of the list.
here is some things that i have tried
CustomerExists() i also have a collection of List<Customers>
//HERE IS MY EXISTS METHOD
public static Boolean IfCustomerExists(string login) {
List<Customer> theGuy = Collections.Customers;
bool exist = false;
foreach (Customer customer in theGuy)
[Code]....
View 1 Replies
Mar 2, 2010
I have following two collections,1. CategoryList, 2. ItemList. I need to get the collection which contains the rows shown in below in "Expected Result List".could you please provide me the LINQ query on collections to get this resulted List?
[code]...
View 2 Replies
Jul 18, 2010
We have a web project that contain its business methods in a class library project called "Bll.dll"
some methods of Bll.dll return List<> ... from a source - that i don't remember now - told that returning Collection<> is better than returning List<> Is it a valid ? Note that i don't make any process on values returned from BLL methods .. just view it in a web page
View 5 Replies
Mar 31, 2010
I want to know that how i use the collection class for storing some data and save it letter in the data base.
View 4 Replies