I'm creating a small, private social networking site. I wanted to add 'emoticons' by filtering text such as and replacing it with an image tag. That's easy enough with stringname.Replace() but what i'm wondering is, is there a way to add some sort of a 'filter' that will automatically do that replacement for me on ANY string post back so i don't have to add the replace code to every page?
I have a Datagrid control which is populated with data from an Access database when the page loads - a simple 'Select *' command. This page also contains a text box and a button, the idea being that the user can then filter the data by entering a value in the text box and clicking on the button to pass the new parameter to the datasource.
However, I cannot get this to work, I know it has something to do with 'IsPostback', but I am at a loss. I have tried variations of the following in the code behind page but to no avail.
Is there a way in .net to display the text automatically when i type the first letter or word in a text box? I am looking for something like MS-Excel.. In MS-Excel, if the first word is given, automatically it displays the remaining texts, only if values are given previously.
In securing actions/controllers, do I have to create a custom filter or use MVC built-in filter?
To use the built-in attribute Authorize() on an action/controller or create a separate class that inherits the ActionFilterAttribute which has a method (OnActionExecuting) to override and do the authentication there?
I'm currently working on a project where I would like to create a search engine page where in the page I have three dropdownlist filters and a button. At the beginning, a gridview will be populated with records from a database table. The user can filter down the gridview data accordingly to the dropdownlist filters selection. But all the filter action will only be triggered after clicked on a Filter button.
These are the dropdownlist filters's items and button:
Employee (All, Gina, Lina, David) - the employee names will changed accordingly based on the logged in user which is supervisor.
Leave Type (All, Annual Leave, Medical Leave, Exam Leave)
Status (All, Pending, Pending for cancel, Approved, Rejected, Cancelled)
For dropdownlist Employee and Leave Type, I have retreived the data for datafields to be displayed in dropdownlist using objectdatasource.
As for dropdown list Status, I have added the items in dropdownlist using ListItem Collection Editor from the properties window.
The problem that I'm facing is I'm not sure how to filter the gridview data accordingly based on the filter selection and trigger the filter action after clicked on a button. Hope anyone here could help me out. I have tried to google search, but couldn't find what I'm looking for.
I have decorated my base controller with a couple of action filters. They work fine.
One of those filters sets up the request - does things like set the culture based on the domain, etc.
I also have a handful of actions that require authorization using the Authorize attribute.
My problem is that when an user attempts to request a page they are not authorized to access, the authorization filter kicks in and redirects them to a page telling them that they cannot vie the page.
The issue is that the action filters never run so the culture and other request data is never set. This effectively causes language to be wrong in the view and other data to be missing.
I know that authorization filters run first but my question is this: How can I design this such that I can ensure that certain methods are always run before the view is returned, regardless of the authorization.
I'm using a ListBox to display fairly long text items (500 characters). If an item is too long it will go out the side of the ListBox and not be fully displayed. How can I get items in the ListBox to wrap? Also, is it possible to put some sort of separator between each item?
I am quite new to ASP.NET. I am trying to display database data using text boxes and then using the same boxes to amend those data if the user wants and then sending them back to database.
I can display all the required fields from database onto aspx page. I have all the text boxes enabled. But when I edit the boxes and click submit, it stores the data that came from the database while I was displaying them meaning that any data updated on the text boxes are not captured at all.
however when i edit the text as follows (making it bold and red in another gridview containing rich text editor)
i get the following (as a formatting result in the second grid view)
however when i view in the first gridview to display the tooltip i get the following result display the tooltip as rich text
although many people say that jquery is "very easy", i have really HARD TIME using it and i tried more than 10 times, always failed to make any use of it. i know it is my bad, but if you know other way not jquery
Im having some text lines that function as links, styled in some fashion.I want to display this text block in couple of pages. Thing is i dont want to copy-paste the text to each page, since i dont want that a minor change in the text will get me changing it for all the other pages.
I dont want to use frames or Master.pages either since i use built template for my site.
i believe im looking for somewhy to create a css-class which contains text that i can modify once in a .css style page, and then implement it in any other page i like.