Web Forms :: Error Connection From Category List To Product List?

Dec 9, 2010

<a href='<%# VirtualPathUtility.ToAbsolute("~/ProductsList.aspx?CategoryId=" + Eval("CategoryID")) %>'><%# Eval("CategoryName") %></a>

it bring me this error Conversion from string "~/Products.aspx?CategoryId=" to type 'Double' is not valid.

View 1 Replies


Similar Messages:

Web Forms :: Dynamically Create X ListBox For Product List?

Jun 27, 2010

I work with asp.net , VB script (web developer 2008)

I need to build page for x product (every user have number of product) and every line i show the product picture + name + listBox the show to the user how much packege he want to buy (0-10)

the button run to see what product the user order (>0 packedges)

how to show at every line(Row) the ListBox , and how to find the product that the user wants

View 4 Replies

C# - Order A List / No Other Fields Associated With A Category?

Oct 26, 2010

I have a function in sitefinity that returns a list of categories.

//return list of categories
private IList<ICategory> GetCategoryDataSource() {
var cntManager = new ContentManager(CaseStudyManager.DefaultContentProvider);
IList allCategories = cntManager.GetCategories();
List<ICategory> filteredList = new List<ICategory>();
foreach (ICategory category in allCategories) {
filteredList.Add(category);
}
return filteredList;
}

What I want to know is how to sort this list.

Categories in Sitefinity are as far as i can tell just a string, there are no other fields associated with a category. Therefore I have nothing to sort the categories on, other than appending each category with a number, like:

1 - Legal
2 - Financial
3 - Property

When these categories are displayed on the website I can then at least trim the parts i need.

View 2 Replies

Forms Data Controls :: Nested Repeater: Rewrites Ending Category List To All Categories

Feb 11, 2011

Nested Repeater Issue: Each category list gets populated with the same set of date values rather then being populated with the data associated with that category. Trying to Do: Trying to group FAQ's by category and then list them using the repeaters.

The data is queryed though a business logic layer object that makes a call to the data access layer object. The data access layer object uses linq to sql to return data. There are 3 parameters that are passed into the innerDataSource's ObjectDataSource control to populate the nested repeater control (propID, CatID, isVisible).

With the debugger, the correct data is being returned and written to the nested repeater firing from the nested repeater's ItemDataBound event. Once this event is finished, another event fires and runs the FAQRule object again on the business logic layer which re-populates the nested repeater with the same data for each category. I have 2 repeaters, outerRepater (parent) and innerRepeater(child) with 2 ObjectDataSource controls innerDataSource and outerDataSource. See code below : ASP Page:

<asp:Repeater DataSourceID="outterDataSource" EnableViewState="false" runat="server">
<ItemTemplate>
<%# Eval("Description") &#43; " " &#43; this.Property.PropertyName %>
<asp:Repeater EnableViewState="false" runat="server" DataSourceID="innerDataSource">
<HeaderTemplate>
<ul style="width: 500px">
</HeaderTemplate>
<ItemTemplate>
<div><%# Eval("Question") %></div>
<div><p><%# Eval("Answer") %></p></div>
</ItemTemplate>
<FooterTemplate>
</ul>
</FooterTemplate>
</asp:Repeater>
<asp:ObjectDataSource ID="innerDataSource"
runat="server"
SelectMethod="FetchFAQSByPrpAndCatID"
TypeName="PropertySite.BusinessRules.FAQRules">
<SelectParameters>......................................

View 3 Replies

How To Create Category And List In One Query With Linq

Jun 20, 2010

I want to create something like this using a DataList and Flow markup:

|-----------------------|
| Title |
|-----------------------|
| [x] Title |
| [x] Title |
| ... |
-------------------------

I have a table (modeled in Linq2Sql) Foo that has these fields

int id;
int? parentId;
string title;
Foo Parent;
EntitySet<Foo> Children;

Now, when there is a null parent, it means it's a top level category, and if the parent has a value, it's part of the category list.

I have created a DataList, and used a LinqDataSource with a query that looks like this:

[Code].....

This obviously doesn't work. How can I utilize the Children collection in a repeater of a DataList item?

View 1 Replies

Architecture :: Manage Wish List For Product Catalog?

Jul 6, 2010

i m developing a product Catalog. All fine, i want to manage wish list for product, which user wish to see, now my question is that how can i manage this wish list, coz i have no uniqueness of the user, coz ny one whether it is registerd or not can wish the product in my scope, i thought to distinguish the user by their IP address becoz this wish list is temporaray, how can i delete the record when user close the browser if go to the IP address for distinguish..

View 2 Replies

MVC :: How To Add Product To Category (Many-to-many Relation)

Feb 16, 2011

I'm trying to add a product to one or more categories, but I'm going nowhere slow.

Table layout:

[Code]....

[Code]....

[Code]....

I been trying everything to add a product to a category, but without luck. I would have though this was the "right" way:

[Code]....

On my "Create" product page, the product is created but I just can't find a way to link a product to one or more categories. It just skips back to the Create page, even though I have put a Redirect in the Controller.

View 12 Replies

Get An Error A String (selected Category In The Ddl) Cannot Be Converted To A Category Object?

Feb 7, 2010

I'll try to explain as simple as I can in text what my problem is. I don't see any other way to make my issue clear.

I have a GridView that uses an ObjectDataSource.

The ObjectDataSource has an DataObjectTypeName defined, so I pass/get complete objects or list of objects to/from the data access methods.

The objects I'm working with, let's say we work with Book objects, contain a Title and a Category, BUT the Category is an object itself. When the Select method is called, we get a List of Book objects, which is perfectly displayed, overridden ToString method in the Category objects within the Book objects.

The problem I face is that I can't find a way to update the category in my GridView. What I did already accomplish is:I used a template field in the GridView for the Category so I could use a DropDownList for that field in Edit mode.

I bound the DropDownList to another ObjectDataSource that gives me a list of CategoryObjects.

So when I enter Edit mode... the row shows a nice ddl with the available categories. It even selects the right original category.

So far so good... but when I want to save my new selection, I get an error that a string (the selected category in the ddl) cannot be converted to a Category object (that's what the Book object, that is going to be used for the update, expects).

View 5 Replies

Web Forms :: Nhibernate Association / Not Set To An Instance Of Object At The Line "category.Products.Add(product);"

Apr 19, 2010

I am using nhibernate and performing one to many relation,

i have a parent table "Category" and child table as "product"

this is my code,

category.CategoryID = txtcategoryid.text;
category.CategoryName = txtName.Text;
category.CategoryDescription = txtDescription.Text;
product.CategoryID = category;
product.ProductName = txtProductName.Text;
product.ProductID = txtProductID.Text;
product.ProductDescription = txtProductDescription.Text;
category.Products.Add(product);
DAO.CanAddCategory(category);

but it throws exception, object reference not set to an instance of object at the line "category.Products.Add(product);"

View 9 Replies

JQGrid Inline Editing - Filter Subcategory Dropdown List Based On Another Category Dropdown

Jul 9, 2010

I have a category and a subcategory column in a Jqgrid. I have enabled inline editing, both category and subcategory are dropdownlists columns (edittype:'select'). I need to filter the subcategory list based on the selected category. I wonder how can I acheive this functionlity? I tried the below event but its not working for me

afterEditCell: function(rowid, celname, value, iRow, iCol) {
//to do here
}

the above event doesn't get fired. my all column are editable

View 1 Replies

Forms Data Controls :: Can Show Multiple Columns In Drop Down List Or List Box

Jun 24, 2010

I have drop down list box that I would like to show two columns, is this possible? Or can it be done with a list box?The query correctly retrieves all of the table data to be displayed, one colum is an abbreviation, the other a bit longer description.

View 2 Replies

Forms Data Controls :: Bind Checkbox List To Selected Items List?

May 27, 2010

I have a situation where I want to show the selected records out of total records for a product of an employee

1) There is a checkbox list bind to <List> of objects from object datasource (For total items in list)

2) Now I want to check the selected items for a particular record in this list

3) For this purpose I have another list of <List> selected items returned by data access layer (For selected items for that employee )

4) How do I bind the selected objects with the total items list ?

5) In spaghetti coding model it was all too easy just by binding the checkbox list with a sql data source and running a for each on form load

View 5 Replies

Web Forms :: Clicking The Label Of A Dropdown List - Resets The Selected Value To The First Item In The List?

Feb 17, 2010

Clicking the label of a drop down list, re-sets the selected value to the first item in the list. This has a history of causing data entry problems when users accidently click on the label.

In the below example ddlContactType has a selected value as 'PRIMARY' and whenever i click on the lblContactType Text, the dropdown box Selected value is changing to "Select One" Text.

How to prevent this one. It should be on PRIMARY Only.

<p>
<tr> <td ><asp:Label ID="lblContactType" Font-Bold="true" Text="Contract Type: *" ForeColor= "red" runat="server" AssociatedControlID="ddlContactType"></asp:Label> </td> <td > <asp:DropDownList runat="server" ID="ddlContactType" DataSourceID="SqlDataSource2" AppendDataBoundItems="true"
DataTextField="TYPE" DataValueField="ID" SelectedValue='<%# Bind("CONTACT_TYPE_ID") %>'>
<asp:ListItem Text="Select One" Value="0" Selected="True"></asp:ListItem>.......

View 4 Replies

Forms Data Controls :: Databound Dropdown List / Shows First Value In List Rather Than Current Value?

Jan 17, 2011

I have a databound dropdownlist and have a problem with the default value it selects.When I attempt to edit a record the dropdownlist shows the first value in the list rather than the current value. I want the dropdown list to display the current value.

I'm sure this is very simple but I'm very new to ASP.NET.

I'm using .NET version 4.

View 4 Replies

Web Forms :: Adding List Items To Drop Down Control From Generic List?

Feb 6, 2010

I have the following Students class:

[Code]....

I need the 1 since it's a foreign key in another table. For the life of me, I can't get this to work like this.

View 7 Replies

Web Forms :: Tab Index For List Items In Radio Button List Control

Oct 17, 2012

Is it possible to set tab index value for list items of ASP.Net RadioButtonList control.

View 1 Replies

Web Forms :: How To Populate Back Radio-button List And Check Box List Comparing With The Character Of The String

Mar 7, 2011

I have string which came from the database,now i want to compare each charater of the string with the radiobuttonlist value and check box list value and select both radiobutton list and checkboxlist.

Here i write down some code but its just select 2 item of the each radiobuttonlist and checked all checkboxlist.

[Code]....

View 2 Replies

Web Forms :: How To Highlight The Current List Item In The Unordered List

Mar 25, 2010

I have a master page which has an unordered list in this way:

[code]....

These links are directed to my content pages. I am able to highligt the selected list item on hover and on active.

But I do not understand how I can highlight the selected list item as long as the user is on that specific page/link (current list item). I know that we can specify a seperate body tag and id for each of the content pages and then use CSS to highlight the current list item, but all this code rests already inside a body tag in the master page.

View 7 Replies

Web Forms :: Disable Dropdown List When One Of Radiobutton List Is Checked

Jan 2, 2013

How to disable two drop downs on checking one of radio button from radiobutton list,,its like radiobuttons with no ID in side <asp:RadiobuttonList> tag. 

View 1 Replies

Forms Data Controls :: List.aspx:datagridview Change The Links To Parent Table From Details To List?

Sep 29, 2010

The List Page display child Entity using the gridview each row will have link to the parent

How can I change the link so it shows the parent but in list view(using list.aspx) not detailes (detailes.aspx)view

View 1 Replies

Web Forms :: Populate Dropdown List From List Of Table

Feb 8, 2011

I'm trying to populate a dropdown list from a list of existing SQL tables in a database. Does anyone have a code sample for doing this?

View 10 Replies

Web Forms :: How To Populate List Box On The Basis On Other List Box

Nov 27, 2010

I need to populate a listbox, however, the value on the second box needs to derive from the first one, such as when I click on North America, USA and Canada would show up. the tricky part is that I need to be able to select North America and Europe in the same time and 2nd list box needs to show USA, Canada, UK, Italy, German accordingly.

A1: North America
A2: Europe
A3: Asia
B1: USA
B2: Canada
C1: UK
C2: Italy
C3: German
D1: China
D2: India

View 5 Replies

Web Forms :: Applying A List To A Listbox - Getting An Error?

Feb 25, 2010

I get a list like this
List<Territory> lst = new List<Territory>(); //it is from a class file.

How do i apply to a listbox in the .net form?

I was trying like this and i get error.

DropDownList1.DataSource = lst1;
DropDownList1.DataTextField = "Description";
DropDownList1.DataValueField = "ID";

View 4 Replies

Web Forms :: Object Reference Not Set Error List

Feb 25, 2016

public class RootObject
{
public string UserEmail { get; set; }
public List<string> UserRoles { get; set; }
}

My class and i am using in this

public List<RootObject> GetUser()
{
List<RootObject> rbl = new List<RootObject>();
RootObject rb = new RootObject();
var manager = new UserManager();

[Code]...

How to initialize Error is because of this

public List UserRoles

View 1 Replies

AJAX :: Display Cascading Dropdown List Based On Checkbox List Selected Value

Nov 10, 2010

How can i generate dropdown lists based on what has been selected in the checckbox list. Below is an example of what i need. if the user selects the options day, lotID and waferID, then 3 cascading dropdown lists should be displayed. And then a gridview displays data based on what has been chosen in the dropdown lists.

Day
LotID
SlotID
WaferID
VendorID
ToolID
LocationDetected
ProcessStep
Stage
Precipe
WaferStartMaterial
WaferStartVendor
WaferStartLot
WaferDiameterCOA
WaferMapTitle
BreakPoint
BreakpointSide
BreakpointMeasurement

View 3 Replies







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