I am dealing with a problem that i have to make decision based on the number of items in a cascading dropdownlist. unfortunately this ajax toolkit control does not expose a Items collection.how do i count the number of items in this control ?
I have a bounded dropdownlist. there may be many items in dropdownlist, i dont know how manty they will be depending on some conditions.suppose there are N items are bounded in this dropdownlist let say
A B C D E . . . . . N
and I am also doing that if i select A and click add button then it'll be added in a gridview, then i selectB and click add button the B will be added to the gridview.. and so on.I want make it restricted like if i again select A and click add button then it should not be added to the grid view and show msgs thatA is already in the gridview. and if I delete A from gridview that and select A again and click add button the A should be add to the gridview.just let me know the logic with explanation.
sorry for the question I'm currently developing a website, a online purchase site.. Is there a way to record the number of purchases made by a customer?I'm using Visual Studio 2010 Ultimate c#.. Thanks again..
I have a gridview where there is a column of checkboxes for the user to check on for the products he/she wants. After checking, they will have to click on a button. for every checkbox that is checked, the result will be stored in an arraylist. after the button is clicked, the label will show the count of the number of objects in the arraylist, which is the number of items that were checked. However, it appears that objects are not being added to the arraylist. What's the problem? Below is some portion of the code for more understanding.
I am using ASP.Net + .Net 3.5 + VSTS 2008 + IIS 7.0 + C# to develop a web application. I want to count how many users are online. This is my current implementation,when Session_Start is called, I will increase # of users online by 1;when Session_End is called, I will descrease # of users online by 1.Two quesitons,A Is that implementaiton correct?B. Another question is, I think this method can not track # of users of real time, since when user closes the browser, Session_End will not be called immediately (Session_End will be deferred to be called). Correct?
We have a ASP .NET application which will be deployed in a web farm. We would like to find the total number of sessions that have been established. If we create a counter in global.asax.cs, it will be able to count only within aspnet_wp process. In a web farm, multiple nodes will have IIS on multiple machines. If we use SQL server-based session management, can we get the total number of active session by querying the Session DB? If we later decide to use session state server to store the sessions, can we get the number of active sessions?
i am wishing to count total number of visits on any particular page with also the ability to work when IIS reset is done, i think by using database we can solve it.
how to count total number of visits on any particular page?
I used this Read DataTable values one by one for making Quiz (only one question on page). But now I want use random for it. Like this: Refresh / Sort / Rearrange RadioButtonList items (options) on Button click in ASP.Net
I am writing a form which has a set of options (radio buttons), and under each option, there is another set of options. For example:
- Session 1 - New Book A - Used Book A - Session 2 - New Book B - Used Book B
I've tried using HTML <input type="radio", and <asp:RadioButton, but even though I assign the "name" attribute correctly, the buttons are not mutually exclusive -- i.e., you can click both within each group. I see in "View Source" that the name and ID are altered, and therefore become ungrouped by the ASP.NET processing. I've tried using <asp:RadioButtonList, and this works functionally, but the items are not grouped properly. They appear like this:
- Session 1 - Session 2 - New Book A - Used Book A - New Book B - Used Book B
I want program test for student exam. One Question with five answer. For example.
Question
The capital of India.
Answer
A) Dushanbe
B) Moscow
C) Delhi
D) Kabul
E) Tokyo
I have many question with answers. When I define correct answer. Program generation always correct answer. In this question correct answer letter C. I want every time program automatic change.
i have a radio button list that on selecting, queries a table and displays data in a textarea. now i'm trying to enhance my code so that the value of the radio button is displayed within the URL. that way i can send users links to content displayed by the radio selection (i.e. articles).
So far i've been able to place the "Article_PK" within the url successfully when the user makes a selection. now i'm just stuck on how to get my databind working again. so basically, i need to read in the value of the "Article_PK" in the url to display the data within the textarea. need someone with some mad coding skills to save the day!
code behind --------
public partial class frm_Articles : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e)[code]......
After editing the list of hardcoded items in a RadioButtonList on a ASP.NET page via the Design view, I find that the HTML source for the RadioButtonList still does not update to the latest list of items i.e items are still the ones before the changes.
Is there a way to synchronize what appears in the Design view and the actual HTML source? Or do I have to delete the RadioButtonList and recreate it?
i read article "using javascript with asp.net radiobuttonlist control" and i found it useful.
[var RB1 = document.getElementById("<%=RadioButtonList1.ClientID%>"); var radio = RB1.getElementsByTagName("input"); if am setting radio[1].checked = 1; the item is checked. ]
How can i get the number of a listview records (or the index of the last record) from within the ItemDataBound event ? I would like to hide one of the controls in the last record, how can i know if the item is the last one ?
I experience a strange issue with DropDownList today.
It is bind to SqlDataSource which produce about 1500 item. SqlDataSource working properly and no mistake in SQL.
When i bind it to a DropDownList, first item automatically selected on load. But if i try to select other items, DDL never renders. Width of DDL shrinks to zero. But if i use UP and DOWN arrows, i can go through items which appears on the first line of DDL. Shortly, DDL never render a LIST of data for me as it is supposed to do.
If restrict the data as "SELECT TOP 100 SupplierName blabla..", the DDL works properly. Is there any data limit in DDL? 1500 line is massive for DDL?
With the same SqlDataSource, ListView control is working succesfully.
I follow the following link for add dropdownlist in gridview.Adding Dynamic Rows in GridView with DropDownLists in ASP.Net..In this template field the drop down list contain 500 items how can i search the paticular item
i want to apply color to selected number of items in checkbox list and seleted number of items in drop downlist for e.g color red for few items and black (default). I have a bit value set in data base so if bit is set to 0 then red and if 1 then back.
I need to bind my dropdownlist to my dataset that is returning application specific text values. But for purposes on that page, i need to assign the value to each one starting at 0 to the number of items returned from my dataset..
Example, if my dataset only returns 1 item, the value of that item needs to be 0
[Code]....
If my dataset returns 4 items, the value of those items needs to be 0 thru 3
[Code]....
Is it possible to assign values like that to a dropdownlist from the code behind?
I have a radiobuttonlist inside a datalist itemtemplate and i need to bind the radiobuttonlist dynamically from database I have tried to bind it inside itemdatabound event of datalist but it the result is always duplicated according to the fields in teh database.
for more information:
the database has two columns one for questions and the other is for choices , for the first question with id lets say 1 there are 4 choices, when the radiobutton is binded the result appears to be 4 times duplicated ?