I have several controls on a page that I want to bind the enabled property to a couple of properties in code behind that are set on Page_Load. Here's an example of what I'm using to bind to the properties.
This works fine once the page is posted back for the first 4 controls on the page.Here's the 1st control that doesn't get disabled like I expect it to. The expression is the same in the Enabled property so I'm not sure why it isn't working.
I want user to be able to scroll in a div to see all the rows. But setting div's overflow property to true. When I starts scrolling header goes away. Is it possible to make header static. So that I can sort or do any kind of other operations.
Currently I tried to take fixed table above grid and hiding grids header. But on editing it is not expanding as the grid is expanding.
is this something basic or am I missing something?My ASP.NET (4.0) site has a web.config with URL rewrite rules. When I run it in debug mode (local webserver) all the URLs fail because the local web server does not recognize the rules (e.g. I have /register which maps to register.aspx etc.)Is there someway I can get the debug system to recognize my URL rewrite rules? Should I be doing something else?
When I open an ASP.NET 3.5 project using VWD2010, I get a prompt error message,"The connection property in the web.config file is missing or incorrect.The connection string from the .dbml file has been used in its place."however, my project works successfully.
I have 1 function that reah all components of the page that call this function.
[Code]....
in this function I set enabled Property of components via parameter "en" but I must cast the object to type manually I want to clear swith statement and change it to 1 line for example: [Code]....
So far, I've seen (and I'm using the following) scripts to show/hide a div or other controls depending on another control in ASP.NET
$('[id$=myRadio_0]').click(function() { $('[id$=myDiv]').show(); }); $('[id$=myRadio_1]').click(function() { $('[id$=myDiv]').hide(); }); and of course, my div in html like <div id="myDiv" runat="server" visible="false">
and that works fine when the user selects either option of the radiobuttonlist. However, when I assign that radiobuttonlist a value of 1 or yes on my Page_Load on code behind, that isn't (and probably can't be) caught by jQuery, and my div remains invisible even though the control has a value of Yes/1. So, do I need to set the visibility of that div from code behind, or is there a way in jQuery to force a scan of these dependencies after i've set the values for the main controls in code behind?
I would like to show the title and the price of a movie in my Gridview. The title and price are properties from the class Movie and Movie is a property of the class CartItem. Here is the Code of my gridview
The DataSource of my gridview is List<CartItem>. This are the classes
public class CartItem { private Movie _movieInCart; private int _Count; public CartItem() { } public CartItem(Movie movie, int count) { _movieInCart = movie; _count= count; } public Film MovieInCart { get { return _movieInCart; } set { _movieInCart = value; } } public int Count { get { return _count; } set { _count = value; } } public double getSubTotal() { return _movieInCart.Price * _count; } } public class Movie { private string _title; private double _price; public string Title { get { return _title; } set { _title= value; } } public double Price { get { return _price; } set { _price= value; } } //More properties here }
Apparently the GridView shows only first level properties, but how do I show these second level properties.
I have a json service method that returns an object with two properties. The first property is called Rows and contains the list of objects I want to bind to the dataview. The second property is TotalRowCount. It is a paging method. How can I tell the DataView to bind to the Rows property? This is what I have so far...
I have build a usercontrol in asp.net, and there is a property like the following.
Everything works fine when the bound value is an integer. However, if the bound field return a null from database, it will return a invalid cast error.
change to a nullable int is not desirable because it changes the how programmer work with the control's property in code-behind.
I like to bind the selected value to the nested property 'Month' of 'OrderDate' as shown above. The property OrderDate is of type DateTime. The error I'm getting while binding to a nested property is:
A call to Bind was not well formatted. Please refer to documentation for the correct parameters to Bind.
In this Grid, I set the datasource to some collection that contains a public property called "Data" and do a databind(). Every works as expected.Now let's say I want to set the DataField attribute of the column to a public member, or a property, or some other thing I've computed. What is the easiest way to go about this without creating intermediate objects or adding public properties to the objects in the collection?So what I want to do is something like:
I am trying to bind a string that contains the ClientID of one user control to the property of another control within a GridView template column. I get the error 'lblVar02' is not declared. It may be inaccessible due to its protection level. How do I do this?
I'm modifying an existing application. I need to be able to bind the Text property of an asp:DropDownList control to one of two fields when the page is rendered. The existing code is like this:
[Code]....
I've tried to use conditional logic on the .aspx page when setting the Text property, but everything I've tried results in an error. I've also tried using code-behind to set the Tetxt property in the Page_Load event. This doesn't generate an error, but it doesn't set the property either.