View Complete Post
I have the following string which is a list of urls. How do I get this to work so the url shows for the selection and also is the value?
allLinks = newAllLinks Me.DropDownList1.Items.Clear() Me.DropDownList1.DataTextField = "Link" Me.DropDownList1.DataValueField = "LinkURL" Me.DropDownList1.Items.Insert(0, New ListItem(" - Select - ", 0)) Me.DropDownList1.DataSource = allLinks Me.DropDownList1.DataBind()
ArgumentNullException: Value cannot be null.Parameter name: container] System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName) +121 System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName, String format) +8 System
i have got two list<string> containing datas
i would like to compare the both list and the result to new list whch does not contains the same data.(basically unique data)
eg shown below..
list A list b list c
a a d
b d c
c f e
f e
plz let me knw..
Hello. I am working through Scott Mitchell's ASP.Net in 24 hours book. I am finishing the photo album project.
I have a GridView that retrieves a list of uploaded photo rows for the logged-in user.The GridView is for editing and deleting rows.
The photo Category field in the Gridview is a dropdown list. The text entry field was deleted after converting this field to a Template.
Like the uploaded photos, these Categories are user-specific. They are created in another web page.
Users also have the option to select "none" for the category when they upload an image.
For the GridView: The Category ID field's ItemTemplate and EditItemTemplate both have a " - None - " choice added to them.
I am getting this error:
'pictureReadOnlyCategories' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value
Note: The ID for the ItemTemplate for that dropdown list is the ID listed above in the error: "pictureReadOnlyCategories".
Am I missing some step in this process of changing a GridViews text field to a dropdown that can be used for editing? I went through the book's instructions three times.
Here is my code for the dropdown list and a screenshot of the Design
I have a generic list of a custom type. The custom type has a string and double.
I'm binding the list to a gridview and it outputs everything fine.
I'm trying to format the double column into a currency format. It is in a template field as I'm calculating a running total. I pass the value to a function that returns a double and adds the current value to a running total which I will show in the footer.
The format is not changing to currency as expected when using String.Format("{0:c}", GetTotal(Convert.ToDouble(Eval("Amount"))))
Any ideas on what might be going on and how to fix this?
Thanks!
Hall of Fame Twitter Terms of Service Privacy Policy Contact Us Archives Tell A Friend