I have a common problem in an ASP.NET web form. I'm just surprised that I haven't found a common solution :)
I have a list of results being returned from a SQL Server database. I want to show those results in my web page with number to the left of them. For instance, my result set may look like the following:
New York | NY
Chicago | IL
Los Angeles | CA
In my web page, I would like to show them as:
1. New York, NY
2. Chicago, IL
3. Los Angeles, CA
I was surprised that I can't find a way to make the numbers automatically appear. Am i doing something wrong? If not, what is the recommended approach?
I have the following issue where I cannot seem to display a negative number and the result seems to stay on zero.
The code is as follows:
[code]...
In my code iNumber1 = 108 and iNumber2=27 however when the result is divided again by 108 the answer seems to stay on 108. I tried using doubles but with no luck.
I have a web form (aspx page) where I load case data for my database and edit certain fields. I want to create a queue box where I can display new incoming cases (Case nums) that have not been edited yet, so that I do not mis any cases on a given day. I visualize my queue box to be something like an update panel which updates itself every few minutes and brings the new case nums in the queue box.
I have Gridview populated with few rows , sometimes in few pages set suppose 12 rows in 3 pages as page size is set to 5 per page. I want the footer to display something like this
while displayin page 1 : displaying page 1 of 3 - items shown 0 to 5 of 12 while displayin page 2 : displaying page 2 of 3 - items shown 6 to 10 of 12 while displayin page 3 : displaying page 3 of 3 - items shown 11 to 12 of 12
In my database one user can have multiple order. i want to get all orders for a user and save it in a list.
this is what i'm doing now
Public Function GetUserOrders(ByVal userID As Integer) As DataSet Dim sqlDA As New SqlDataAdapter Dim ds As New DataSet Dim myCommand As New Data.SqlClient.SqlCommand("sp_GetUserOrders", myConnection)
[Code]....
but i can't seem to figure out how to assign the results to a list.
Dim orderList As New ListItemCollection() orderlist = GetUserOrders()
I need to display a table with various info (names, dates, serial numbers, notes). In addition, there is one field I need to be one of three specified values (Raise, Lower, Release). What view would be the best/easiest to implement which would let me add/edit/delete entries as well as provide a drop down option for the Raise, Lower, Release options?
With reference to the following thread: URL....I have problem applying the same concept to gridview EditItemTemplate. Is there a way i can add comma to large numbers and display it in currency format like exemple below:
Textbox3=Textbox1 * Textbox2
Textbox3= 1,000.00
Textbox3 should happen OnTextChanged and the above controls are in Gridview edit mode.
How can i calculate the sum of two textboxes(Textbox1 and Textbox2) and then add comma with .00 to another textbox(Textbox3). Example say Textbox1 = 2 and Textbox2 = 500
I have a gridview control sitting in a jQuery Accordian. The data in the grid diplays fine, however in IE 6 the page numbers do not display when the pane of the accordian is first opened. If you open another pane and then re-open the pane containing the grid view the number appear. There is also no issue with IE7 or later or FF.
I would like to to make a UI with a panel of numbers, and when hovered above one of them ten the number becomes larger. something like that:
[URL]
I want that when I press a numbers it shows it's value in some other textbox. In which .NET technology is it possible to do it? Windows Forms? WPF? other?
I am wondering into the unknown field of OOA and was looking for a way to separate my business logic from my UI. A small example is as followed:
Two DropDowns where the second one is depended on the selection in the first DropDown. You have Cars, planes, etc. inm the first DropDown and Toyota, Chrysler, etc in the second (depending on the value in the first DD.I have som Lin syntax. The file is situated in the App_Code folder and NOT as code behind. [Code]....
I would like to know how i can make populate my second Dropdown list with results. At this point it's just putting in the complete ProductSubCategory.
I want to display sql query results in my web application (asp.net webpage) dynamically at the run time. But I don't know how to do that. Is there any control to do that? Or is there any code? Could you give some examples?
Dim Result As New DataTable DataAdapter.Fill(Result) 'bind data to visible surname/name grid If Result.Rows.Count = 0 Then NoInputBottom.Text = "No Results. Please widen your search criteria and try again" NoInputTop.Text = "No Results. Please widen your search criteria and try again" Else GV.DataSource = Result GV.DataBind() End If
I have also tried moving the check to the gridview like so:
If GV.Columns.Count = 0 Then NoInputBottom.Text = "No Options Selected: Please select your search criteria and try again" NoInputTop.Text = "No Options Selected: Please select your search criteria and try again" End If
When I run the code. the noinput labels do not have value, the null check seems to be failing? how to display a message if the search returned no reults.
I would like to query a DB and output the results to the webpage. What is the best way to do this while avoiding gridview, etc?
So far I have the following code: (which works)
sqlLookup = "SELECT * FROM locations"; string connectionString = WebConfigurationManager.ConnectionStrings["LocationDatabaseConnectionString"].ConnectionString; SqlConnection myConnection = new SqlConnection(connectionString); myConnection.Open(); SqlCommand myCommand = new SqlCommand(sqlLookup, myConnection); SqlDataReader myReader = myCommand.ExecuteReader(); while (myReader.Read()) { locationCode = myReader["locationCode"].ToString(); locationName = myReader["locationName"].ToString(); notes = myReader["notes"].ToString(); }
In the past I used to inject HTML into a DIV element via the WHILE loop but this always creates a huge delay when renering the page. Is there a better method?
I am developing a web form for search capability. The search query should return records from three different tables. How to display these three table records in three different rows. The search query should get the results from Table 1 and Table 2. Table 2 and Table 3 has a parent child relation ship. Which controls can I use for this purpose?
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
I have a simple .net form with two input boxes to choose the event and location. On button click, an xml url is built and this xml file is read using ReadXml, dataset is built and the results are displayed in the same page. I have both the forms to run at server and it says I cannot have it.