I'm learning to create a webapp using asp.net and C#. And I already create a basic user database webapp. Wherein I display all the user information in a tabled manner. So basically I just used the table element from HTML and not the gridview control.
But I have a problem right now, I want to add a user search functionality wherein I will just input the user's firstname in the search box, so then when I click the search button it will display the user information in a table format. So I don't know how to implement it because I used the table element not the gridview. Where to I write the data that I searched?
Please advise.
Many thanks
It doesn't matter what you use to display the results, you can reuse that code. The only thing you need to change is the way you select the data from the database based on the firstname.
Related
hi i have two xml file and i want to bind grid view eith this xml file on client side. i try to describe the complete senerio. in my .aspx page i have a drop down list which has number of department. when the user select the department the data i want the data according to department comes on the grid view from first xml file, in this gridview the rows are field with various tests and the row also have a checkboxes ,when user click on that checkbox the datafrom yhe second xml file will come and the second grid view is bind with that data. i want all that on client side. how is that possible, please help me and thanks in advance for help
I would suggest you to either use jqgrid/html table and use this article to read xml using javascript or if you wants to use gridview only and don't wants to show post back to the user then use updatepannel with gridview will help you out.
I am working with a Telerik Radgrid on an aspx page, which basically has to bind to a datatable, which gets populated by data returned from a web service. I need to be able to fill out some of the columns in the RADGRID based on the data returned by the web service.
For example, I need to be able to build the Hyperlink column based on the parts data returned by the web service. I need a way to access the datasource before the grid item gets populated and direct execution to a routine which builds the URL for the parts on a website.
Can anybody please suggest an efficient way to do this?
I highly appreciate any help/suggestions.
Thanks
Karthik
(Moving my comment to an answer, because I'm thinking this will work out for you.)
You could always cheat and bind it to the grid, allowing you to access the data, but then hide the columns so the users could never get the data.
Let me know how it works out.
EDIT:
My select statement is "select top 5 ProductName from products"
I then created a hyperlink column and assigned the properties under the data tab as such.
When run, it makes the data clickable and when clicked, it navigates to the url seen in the SS.
That what you need?
I am not a .net programmer but I can write bits and pieces that I need, however, I have been having trouble working out the best way to achieve something for a website I'm altering.
I basically need to have a drop down list which is bound to a certain SQL call (already in place) but I also need the ability to manually type into the drop down list for items that do not exist. These items do not need to be entered into the SQL (I can handle the additional data separately) but I cannot find a way to type inside a drop down list while it is bound to a datasource.
Some entries in the datasource (SQL table) are used for one thing, but then a text string needs to be entered for optional entries which do not exist within this SQL table.
Does anyone know how I can achieve this or maybe another similar control can be used that offers this kind of functionality?
**Update to be more clear:
I need this at runtime. For instance, I do not need this to be within code I actually need the control to accept user input when someone is on the webpate.
Imagine a shopping list and all the items are within the drop down list then the user wants to add another item to the shopping list so they just type it into the drop down box and submit the page and its value will be used instead of an existing item.
As suggested by David, Telerik ComboBox provides that functionality.
Other ways, to use an ASP.NET and jQuery for implementing that functionality.
Using TextBox permits manual entry and using jQuery UI AutoComplete widget to bind required items.
jQuery Autocomplete and ASP.NET
TextBox AutoComplete with ASP.NET and jQuery UI
3 Different Approaches for Implementing the JQuery Autocomplete with ASP.NET
Ive got ASP.NET web application form where users enter details such as:
Subject Code
Subject Name
Subject Details ....etc
I would like the users to click on plus(+) or add button which creates new empty rows for users to fill above fields. They can enter up to x number of subjects.
Is there any easier way to achieve this?
Please note this is just one part of the form. The other part of form includes student details, comments etc. So ListView or GridView is not an option for me right now.
Thanks.
Regards,
I think ListView was a good choice here.
The ListView Control (Video).
ListView Web Server Control Overview.
However, refer to ASP.NET Data controls to get help in this issue.
I am new to asp.net. I have a details view control on my page. I use linq to sql. My details view is an admin panel for data entry page. So some members will enter some news to my database. I want to use "Writer" Data Field to be filled automaticly with the current logged user. How can I do that?
Thanks
You will simply need to inject the username into the field at some point.
There is not a point-n-click drag-n-drop solution to this case, and there are many ways to accomplish this and to go into further detail is likely not necessary.
Just get the value into the textbox or field as the page is served where L2S can pick it up on the postback.