i m using a regex to not allow certain characters, the below code works fine for certain html tags but not for all for i dont want the user to enter html tags for eg if i enter <nitin/> it allows but i dont want this to happen for other html tags it does not allow
!@#$%^&*()+=[]\';,/{}|":<>? or
!@#$%^&*()+=[]\';,/{}|":<>/>?
I have an image (consider the image of a clock). I would like to change the position of the dials depending on values retrieved from database. (This will probably be done using a service which will run every minute or so.) I just want to know how I can change the image (i.e modify the existing image).This is for a dashboard screen. The images would be refreshed every minute to get the latest data.
I'm having a little trouble with using regex in linq. I want to be able to perform a search on values in my database. The goal is to insert a value into the regex and then use that to search a column in a table in my database for that term. I want it to work so that it gets all exact matches and also returns matches in which the search term is a substring of the term in the column.
I was trying to follow this tutorial on msdn, but it doesn't quite fit perfectly with my problem:
Title Return Type The Inception 1 NFS 2 Tron Legacy 1 Documentary 3 Roadrash 2 I want to pass this object to a method which modifies it using linq query to return the Dataview object as below(without using loops anywhere in the code) Title Return Type The Inception Movie NFS Game Tron Legacy Movie Documentary Others Roadrash Game
I store a large structure holding my application's reference data in a variable I access through HttpContext.Application. Every once in a while this data needs to change. When I update it in place, is there a danger that incoming requests will see the data in an inconsistent state? Is there a need (and a way) to lock some or all of this structure? Finally, are there other approaches to this problem other than querying the database every time you need this (mostly static) data?
I am using a regex to detect forum tags within posts, such as "[quote]text[/quote]" and then replace them with HTML formatting. I posted a question Forum tags. What is the best way to implement them? about a problem with nested tags.
Right now this matches an opening and closing tag, with match groups for the tag name, the tag content, and an optional value like the value after the equals in this forum tag [url=www.google.com]click me[/url].
What I need is for the expression to match the opening tag OR the closing tag and have a match group containing the tag name (including the '/' for the closing tag). I then want to iterate through them sort of like this:
Dictionary<string, int> tagCollection = new Dictionary<string, int>(); inputString = Regex.Replace(inputString, @"expression I'm asking for here", match => {
[Code]....
So now, each tag is appended with a number and I could use the original regex to perform the tag functions and properly handle nested tags as separate tags.
I am creating a Quartz.NET application in C#, and creating a bunch of administration webpages (C#/ASP.NET) so users can easily create jobs, set datamap fields and edit datamap fields.
I'm having some trouble editting jobs data maps though - any changes I make aren't saved at all. Is there anything I need to call after modifying the jobs data map?
When I have multiple entries with the same id in a list box the selected index is always the first instance of the item. How do I get around this without modifying the id of the items in my list box so they are unique?
I would like to store some meta-information about a given site instance that can (a) be managed by that site instance and (b) persist clobbering of Web.config file.The site will run in multiple environments (dev,testing,staging and production) and each environment can have different values for this metadata. Note: All environments are running IIS 7.0+
The Root Web.config seems very appealing, as it is certainly outside of the website. Therefore, both files and databases can be changed while maintaining the metadata. I have seen how to modify the appSettings of the Web.config stored in the website, but is it possible to similarly modify the appSettings in the Root Web.config (Specifically within the proper directive)?
I have a Quartz.NET application where I need the administrators to be able to modify the job details - mostly information in each jobs datamap, but also things like the triggers - here is my code I'm using
I have a formatted table in ReportViewer. When I want to export to Excel though - I do not want to export the formatted table - instead I want to output the original/raw/unmassaged data table in an excel file.
What's the best way to intercept the Export to Excel function and output data in a different format?
I use the FormView control quite a bit, but I wish I had more control over the default templates.
When I drag a FormView from the toolbox onto my page and point it to a DataSource control it prepopulates the ItemTemplate, EditItemTemplate and InsertItemTemplates, but it doesn't do it very well.
For example, the InsertItemTemplate looks like this by default:
I know I can use a DetailsView to get a table rendered out, but I end up modifying the form so much that I prefer to use the FormView. It's just that I would like Visual Studio to start me out a bit closer to where I want to end up.
I would imagine that there is a T4 template somewhere in the guts of VS that I might be able to modify to get this done.
I'm retrieving the data from database to fill the combobox. The name of the combobox is kategorilist. I want to set a string value to datavaluefield of the combobox. Also I'm using datalist with paging in this page. Datalist is binding with the selected value of the combox everytime.
I'm trying to modify the output of my GridView in the RowDataBound event handler, but it's not working - nothing happens.
My code:
Private Sub MyGridView_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles MyGridView.RowDataBound e.Row.Attributes.Add("data-xkoordinat", 0) End Sub
[Code]....
Is there anything here that would cause the rows not to be databound? I'm reloading via F5 or by selecting the address field in my browser and hitting Enter, so I don't think postbacks should be an issue.
I'm playing around and created a new Web Form project and trying to make way with the default template. I've created the pages I need but trying to leverage the existing membership pages and ASPNETDB. I'm having trouble grasping how the asp pages are connecting to the database(and thus make my own changes). I cannot see any SQL syntax in the aspx pages or the code behind? I can tell the project is making use of the stored procedures but where is the actual connection configured or the command that is being run, for example when the "create" button is pressed on the CreateUserWizard control. Looking at the createUserWizrd I cannot see any adapters it might be using?
Perhaps my mindset is trying to apply, tableadapter and datasets way of working to asp controls. All the information and tutorials I'm looking at, seem to bypass the connection to the database and somehow there controls are 'taking care' of the I/O to the database. So if I wanted to add an additional field to the createwizard process, what do I need to do? Alter the db and the stored procedure, then?
I have two user controls (wishlist & shopping cart) The shopping cart & wishlist objects are both in sessions.Also both controls are sitting inside the masterpage and the wishlist has the ability to move an item to the shopping cart. Now how do i achieve this? Originally i thought i would expose a public method within shopping cart called "BindItems" which would rebind the datacontrol, however this is causing .NET's automatic postback validation to throw an exception.
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.I dont want to set EnableEventValidation to false either for security reasons.
I am trying to restrict the data in the report with the use of a start date and an end date selected from a textbox (w/ ajax calendar extender)
should this be done on the report side or should i create a stored procedure and pass the variables to the stored procedure by microsoft report viewer.
It seems like there is two connection strings to the database, one for the report and one for the report viewer, is this correct?
I have a textbox with a calendar icon next to it. When the icon is clicked a popup form displays the calendar control. I have it set up where they can only select the week ending date(saturday) and that date is displayed in the textbox.
I want to prevent users from editing the textbox. I've tried using the readonly and enabled properties but that doesn't work.
How can I keep users from modifying the date in the textbox?
i have a Rad Upload control to upload more than one image ,,the problem is i want each image to have a caption (inserted by the user as a text)during the uploading operation,,so what i wanna to do is modifying the Rad Upload control and adding a text box in it and access the data in this text box .. how to do this?
I'm localising a site via a Change Language control in the master page. I need to render the control with the current url you're on in each of the different languages.
So if you're on http://site.com/en/Home/About and you change the language to french, I need to direct you to http://site.com/fr/Home/About.
The localisation code works on the route data language property, so I've been trying to figure out how I can:
Get access to the current action (with all original parameters) Get the url to the current action (with all original parameters) with the route data changed.
I've tried passing the ViewContext from the parent into the UserControl, which gives me access to the route data but I can't figure out how to get the language routed url from that.
I have downloaded the source code for the latest version of the AjaxControlToolkit and have noticed that there are differences in the scripts included in the solution.
Previously, only one debug version of a JavaScript file was included for each control. This was then stripped of newlines and comments before building in release mode to embed these modified files in the output dll. However, now the solution has both the debug.js and .js versions (debug and compressed versions, respectively) included in the solution for each control.
My question is, if I desired to make changes to the debug versions of the JavaScript file for any control, does the compressed version of the file get generated automatically or is there some manual action I need to take to produce those files? It appears as though with this solution there are no integrated build tasks as in the previous versions so I feel like my latter suspicion may be correct but was hoping for input from somebody who knows more about this.
I do not like the idea of including overriden methods of toolkit funtions in my site's JavaScript, I am just curious how I would go about producing the release version of the script. In other words, how would the developers that work on the AjaxControlToolkit do this when working with the solution.\ | m ny;[6n n