ajax Address field for email client-like environment (asp.net) - asp.net

There is this magical To-Address field in yahoo mail , which you can type-in the names and shows you an auto-complete list , click on the names and then a block shows up in the field , each block has a tiny x mark and you can just delete the names from the field and all remaining block shift to left to fill it's place !
how can i achieve this behavior for a address field in my application , with minimal effort on asp.net ?
plus : i mainly looking for a .net component which is preferably free to use , the commercial one's are appreciated .

Rather than a .NET component, take a look at some client side plugins. TagIt, for JQuery, is a good one for doing just what you are talking about doing. Here is a demo: http://webspirited.com/tagit/
You can also wire up a web service and retrieve values from the server based on the input the user has entered (auto complete functionality). It's definitely one close to what you are referring to.

Related

how to adda drop-down box to the basic info page of publisher portal?

I have wso2am4.0.0 and run success.
I want to change the textbox to drop down box of the Roles of basic info page (https://localhost:9443/publisher, Develop > Basic Info) , like image below.
How do I modify the source code of carbon-apimgt to make this change?
The publisher portal code can be found here - https://github.com/wso2/carbon-apimgt/tree/v9.0.174/features/apimgt/org.wso2.carbon.apimgt.publisher.feature
AFAIK, it's not possible. For that, you need to populate the existing roles list. Current publisher Rest API does not have such a resource to populate the role list and it only contains a validation resource[1].
[1] - https://apim.docs.wso2.com/en/latest/reference/product-apis/publisher-apis/publisher-v2/publisher-v2/#tag/Roles

VS2008/ASP.NET 3.5 - How to create dynamic webforms

The question in a nutshell: Is there a way to add forms dynamically to a aspx-page? I know how to add controls to an existing form, but how to add a whole form?
Bckground:
I am "forced" to work in Visual Studio 2008 and I want to create a controller, which builds a page depending from the list of elements a model gives it (e.g.: the list may contain a paragraph, an image, another paragraph, a parapgraph again, a form and so on).
This works fine for the first examples as I am able to add them to the inner-html of a div-container.
Thinking about ways to generate a form like this (innerHTML += form), I feel I'd be throwing the few possible advantages ASP I can see (compared to PHP) out of the window in terms of input validation and so on. But I can't find a way to generate a "real, server-run" form. The same goes for gridviews, but I guess the solution may be similar.
A possible workaround would be to create an empty form
<form runat="server" id="dummyForm">...
and add controls to it dynamically. The obvious(?) downside to this would be, that I couldn't change its position (at least I wouldn't know how) in relation to the other content elements.
Another downside would be that I would be limited to one form per page and that may or may not be sufficient. If it wasn't I would starting to add several empty dummy-forms and would start indexing them and all of that doesn't look very cool to me.
Is there a more elegant way to a solution?
TIA
Simon
You can't add more than once server side Form tag in single aspx file
(in run time or design time)
maybe this article help you to generate dynamic forms :
https://msdn.microsoft.com/en-us/library/aa479330.aspx

Reading Label Barcode in asp.net mvc4

I am developing a web application in which we have generated labels with barcode. Now we need to read these labels during packing stage.
I understand that Barcode scanners work as keyboard entry so I have created a View with text box to read the barcodes from labels. When I scan any label its reading barcode and automatically directing to some search page.
View
<td>
#Html.TextBoxFor(model => model.StyleNumber)
#* <input type = "text" style="border:0px;" value = "" />*#
</td>
There are 2 issues :
Automatically append row with a text box with for each label
Not to direct to some other page and have all the scanned labels on the same page to be read and used for further processing.
I have tried a lot but didn't find anything concrete. Please advise.
I'd like to suggest to move in this direction:
Obtain technical specification of barcode reader
Barcode should add some "begin and ending char" before and after the barcode read
Example if you barcode in 123456 reader can add 123456/n
where /n is new line or something else
You can monitor keydown of text field and monitor when text change and you detect ending character, at this point you can submit the form that contain your textbox. You can use javascript/Jquery
http://www.aaronkjackson.com/2011/02/quick-tip-use-jquery-to-submit-a-textbox/
This example if the first that I've found but it can be improved for example sumitting a form without button
You can perform barcode validation on server side
At this point you can process barcode on server side and return void from controller method. Y
You can improve solution providing some better user experince for example validating barcode client side or hide the text control or submit data using jquery insted of form like this:
How to send data in jquery.post to mvc controller which use ViewModel as parameter?
Pay attention on setting focus over control otherwise if user ckick mouse out of text control the text read form barcode reader isn't inserted into textbox.
I think that could be possibile develop some ActiveX but this is more invasive solution
HTML5 is your answer. But it will work in HTML5 compatible browser only. If you are targeting older version of browser you need to create Activex which is pretty old and not secure.
There is a jquery plugin for reading QR and Barcode which is worth looking into it.
http://dwa012.github.io/html5-qrcode/
Another way is doing capturing it on mobile devices with HTML5
http://www.html5rocks.com/en/tutorials/getusermedia/intro/
There is a paid option also.
http://www.visionsmarts.com/products/barcode-shell.html

Flex Application for PlayBook Text Input Variable

I know this is probably a very simple question, but can someone please walk me through how to take what a user inputs into a s:TextInput and use that as a variable in a JSON data request?
Basically, I want to have a user enter a search term, like "math" and then have that placed into a variable so I can use it in a JSON request.
Something like public var q:String, except that my search box (and hence user input) is on another "view" of the application.
I've just started with Flex Mobile applications and I might be way out of my league. Does anyone know how to do this?
The containing view should still be able to access teh child view's properties (and therefore controls); you just need the control(s) to have a unique ID, which then becomes a property name. That said, I would consider the whole search feature to be self-contained, so it'd have its own controller (action script class for handling actions) wired up to the search button, adn have a reference to the view that it can extract the info from, etc.

ASP.NET 3.5 - Making a field readonly/unmodifiable without "disabling" it

I have a web application with a form that has disabled fields in it. It allows a "Save As" function which basically means the settings can be copied into a new configuration (without being modified) and in the new configuration they can be changed to something else. The problem I am running into with this is that since the fields are disabled, they are not getting posted through and do not appear in the context object on the server side.
When I removed the logic to disable the fields, that part works fine. So the remaining problem is, how to "disable" the fields (not allow any change of the data in any of the entry fields) without really "disabling" them (so that the data gets posted through when saving)?
I was originally looking for a way to do this in CSS but not sure if it exists. The best solution is of course, the simplest one. Thanks in advance!
(Note: by 'disabled' I mean "The textboxes display but none of the text inside of them can be modified at all". It does not matter to me whether the cursor appears when you click inside it, though if I had a preference it would be no cursor...)
http://www.w3schools.com/TAGS/att_input_readonly.asp
readonly attribute is what you want.
i would suggest that instead of using the non-updateable field values from the page's inputs, you retrieve the original object from the DB and copy them from there. It's pretty trivial using something like Firebug to modify the contents of the page whose form will be posted back to modify the values, even if they are marked as readonly. Since you really want the values from the original, I would simply reget the object and copy them. Then you don't need to worry about whether the original (and non-updateable) properties get posted back at all.

Resources