asp.net autocomplete fields - c#

I need to autocomplete a form's textboxes based on the input of the first text box.
Basically you enter a name in the first text box, that is searched in a SQL table and if found, the remaining text boxes are filled with the relevant information.
I did come across the ajax control toolkit AutoCompleteExtender but that only seems to work for one text box.
How can I auto populate the remaining text boxes? Is there a way to do that with the AutoCompleteExtender?

Related

Display html content in an ASP.NET Textbox

Its often that we need to display some formatted html text in a Web page. Here is what I want to do
There is a description field where user enters his comments.There's anther History field which shows some history about the user edits done. I just want to bold the User comments. Everything else in History Text box can be normal text.
Now I have two options here
Let the User bold his comments by using a third party editor like TINYMCE or CKEDITOR.
Let me bold the text after the user clicks submit button on the Page and render it in History control.
If we use Approach 1, It will be an Issue to show html content in History control which is a plain Text box.
Similarly in approach 2, we can't directly display formatted text in history control and storing htmltags in DB might be an issue.
Now, I am in a confusion which approach is right and how to achieve this.Kindly comment with your expert views and suggestions
Thanks

Winforms - Combobox autocomplete doesn't show items with the same name

I have a combobox with autocomplete,
Some of my items have the same display name..
The autocomplete shows only the first one it finds...I need it to show everything that matches the text input and not just the first one.
All i can find online is people making custom autocomplete comboboxes.
all i need is for it to show all matches.
Is that possible?
Not without making a custom combobox.

how to connect two rich text box

I write a word processor, and I want to display the text on separate pages, like Microsoft Word, then I think do Collection of Rich Text Box, and I want that when a user typed in and filled the first box in the text, The cursor moves automatically the second box.
How can I do this? Is there any event activated when the text box is filled?
I found this to build OnVisibleScrollbarsChanged event. http://www.csharp-examples.net/check-scrollbars-visibility/
There are events which trigger when the textbox's text get changed.
So count the amount of text within that box, and if it reaches a certain amount - go to the next 'page'.

How to edit values in a c# listbox

This is more of a UI Design approach on how to let the user edit values in a list box.
I am interested in the Usability issue.
First approach is having a textBox near the list.
When user selects an element in the list, the text goes to the textbox.
My second though is having an input box coming up (a modal) and edit the value there.
Another option is to use a list view and let the user edit inline. This might be tricky if the user doesn't know this is editable (not all user do)
What would you prefer? Any suggestions on a different approach?
I have used data binding to bind text boxes and numeric controls to a listbox. As the list box selection is changed then the relevant data appears in the controls.
Another way is a property grid linked to the current selected item in the list box. That works well for users who may be relatively savvy for the property grid.
As far as I think I would go for your second approach. I would like an edit button. When I select any item in the list box, edit button should be enabled. When I click edit a small modal dialog saying ok or cancel and in textbox displaying the current value which I can edit.
I think a list view looks a lot cleaner, and people are getting more used to this kind of thing as more web pages use client-side script, Ajax, etc.
I don't like the idea of a modal popup - very clunky.
I did this recently using a hidden text box that I would show positioned over the list box item populated with the selected item text when the user double clicked or pressed F2. When the user pressed enter or the text box lost focus, the text box was hidden and the list box item text was replaced with the edit box text. If the user pressed escape, the text box was hidden and the list item text remained unchanged (i.e cancel).

C# Rich textbox Append/Delete Question

I have a rich textbox which contains data loaded in from a database. I want to change the functionality of the rich textbox to ensure that data can only be written to it by a user and not deleted from it.
Of course, making the rich textbox read only won't help, nor will not enabling it. I'm stuck for ideas
With only one RichTextBox, you can't. What you have to do is instead of working with one RichTextBox, you could have two. Use one to show the data from database, and use another with editing enabled for the user to submit new data. something like how forum handle posts.
You can have the original content loaded from the database displayed in a label and have a separate textbox in which the user can add new content. On save you will concatenate the db content with the text from the textbox and save it back to the DB. This way you can only add and not remove from the original copy.

Categories