Display circle in Listbox in asp.net - asp.net

Hi i want to display different size of circle in List box in asp.net can any buddy tell me code of that

It depends on what kind of circle you want. Although what Gidon said was right, there are a couple text characters that may just do the job. These characters you may want to look at are:
● = Black Circle
accessble by using the sequence ● in your option text;
○ = White Circle
accessble by using the sequence ○ in your option text;

The ListBox control in ASP.NET renders as a HTML select element. This element only accepts text.
This doesn't mean it cannot be done in another way, but you'll have to write your own implementation, using javascript etc.
Based on your question I'm not sure if you might first want to learn some more HTML, javascript and maybe also ASP.NET before we can discuss the details of such an implementation.

Related

RichTextFX, part of document content readonly

I'm using RichTextFX to implement a commandline interface. What this means is that only the last line of text should be editable, while the previous content should be readonly.
Is there a way to mark a given span as readonly? If not, what is the best way to solve this problem?
Note that I eventually will want to allow other parts of the content to be editable, and not just the last line, so I'm really looking for a generic solution.

Link jQuery-UI/Kendo-UI to make live changes to elements in page designer

I apologize if the title was not clear enough. I am working on a project where a user can design a page (something like Wix). I am continuing on a project left in-complete by some developer. The sequence of action is.
The user clicks on a link which adds an element on the page (e.g. textElement, picture, slider...)
There is an edit button for each element. Clicking which opens a dialog box.
On the dialog box there are sliders and color picker drawn using Kendo-UI. Using them the user can change the style settings for the element (e.g Font-Color, BG-Color, Font Size...)
What I want now is to apply/show the changes live on that element. I have the id available for each element. I can bind each of the style selectors and apply the changes live to the text element. But that does not seem the right choice as in future we might add another style selector in the dialog box, and that would mean adding the code for binding this new selector.
What I wanted to know was that is there an alternate or preferably easy way to do this?
Regards
Share some code with the basic idea that you follow, cause it's not getting clear what you did. It sounds like you can use the MVVM framework feature to help you for that.

Searchable TextBox?

I'd like to have two textboxes, one that is large and read-only, with content from the server, and another that is one line and that searches the first text box. The word the user puts in TextBox2 would be highlighted/bolded/whatever in TextBox1.
Example:
TextBox1:
This is an example of the possible contents of my read-only text box. It would go on for a bunch of lines...
TextBox2:
box
Is there any way I could do this? I've thought about using the AutoComplete TextBox from the AjaxControlToolkit and setting the Service Path to wherever I'm getting the contents of TextBox1. But that's not doing exactly what I want, because I'd like to interrupt the suggestions and use them to search TextBox1. Any ideas? I'm pretty new to asp.net and just fishing around for somewhere to get started on this one.
I would recommend a JQuery plugin like this. I don't think it will work with a textbox, but you could try. Do you have to use a textbox for the first one? Could you use a DIV instead, if it doesn't work?
An example of usage:
$('target').highlight('box');

Auto Complete Extender for multiline textbox - Facebook style

I have in my application a larger textbox and offer user the possibility to enter text on several rows like this:
first piece of text
second piece of text
and so on...
Each row is a distinct piece of data that has a significance. The thing is I would like to use ajax auto complete extender functionality after the user types a certain character on a row, such as #, and filter the records in the database according to the first letter the user typed after #, moment when the auto complete suggestion list would appear. For example, third piece of text #Action1, means that after the user typed A he would be prompted with a list of values to choose from.
There are several items of concern for me: first, it is possible to use autocomplete extender only for part of the text in the textbox, and second does it work like this for multiple rows (i.e. one time - in each line behaviour)? Regarding its position, I guess I have no other choice than at the bottom of the textbox it refers to, despite I would have liked it to appear below the # symbol.
Thank you very much.
Update: I found something similar to what I am looking for here: Twitter-style autocomplete in textarea, but the author only explained briefly his solution. Any help much appreciated, thx!
Each row is a distinct piece of data that has a significance.
Why are you using a textarea then, and not multiple <input> fields?
Sounds to me like your error in UI design lies right there already, so the rest of my answer is rather theoretical; I probably won’t go into more details as the sensible fix for your problem is the one above.
first, it is possible to use autocomplete extender only for part of the text in the textbox,
Why shouldn’t it be? Cursor position in a textarea for example is readable (although it requires some working around cross-browser issues).
and second does it work like this for multiple rows (i.e. one time - in each line behaviour)?
So long as the line breaks are “hard” ones (made by the user themselves, using enter/return), splitting the actual textarea content by "\n" to have each row as a single value is no problem.
Regarding its position, I guess I have no other choice than at the bottom of the textbox it refers to, despite I would have liked it to appear below the # symbol.
You could try to roughly measure the #’s position, by line and col number it is on, and match that to the character width and line height, when using a monospace font. For other fonts, some more “magic” might be required to measure the actual width of the previous text before the # character.
I have created a Meteor package for this, which allows both free text and multiple autocomplete sources. Meteor's data model allows for fast multi-rule searching with custom rendered lists. If you're not using Meteor for your web app, (I believe) you unfortunately won't find anything this awesome for autocompletion.
https://github.com/mizzao/meteor-autocomplete
See the link for pictures of how it works. Fork, pull, and improve!

Adjust ASP button element font size

How can I implement a font-resize feature that also adjusts the text size of all ASP elements?
I'm part of a team that is working to implement an interactive course catalogue as a class project. The typical user for the site will be > 50, and one common request from surveys an interviews was to have a user-adjustable test size increase/decrease of not only the on-screen text, but the buttons, lists and other elements.
Another requirement for this class: everything has to be implemented in ASP.NET & C# 4.0.
According to the documentation, the object FontUnit controls the size and type style of ASP elements. We're going to be using a number of elements nested inside HTML divs, and would like some way for a single button click to implement a page-wide text size increase/decrease.
I tried
btnTextSize.Font.Size= FontUnit.Larger;
to test on a couple elements, but there was no change in size.
Try this:
http://www.white-hat-web-design.co.uk/blog/controlling-font-size-with-javascript/
It's javascript, but it may work for your needs.

Resources