As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm asked to build a simple web site. Every page of this site is mainly text. I want them to be able to change all the text dynamicly.
What is a better way:
1) To store all the text in database.
2) On text change replace existing aspx file with new one with changed text.
I would prefer a way where the changed pages will load faster on client side
Given these requirements, your best solution is a CMS (content management system).
There are plenty of options for asp.net, like Umbraco, DotNetNuke etc.
Doing this by storing all the text in the database will be just like implementing a CMS. The second option is really really old school. You may as well put static html pages on the server in that case.
You should change text in the controller. Don't replace pages.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
A user can enter HTML that will later be displayed to other users. The WYSIWYG plugin i'm using sanitizes the HTML from the front end. It removes all potentially malicious tags (script, src, anything starting with "on" etc) I obviously need to do some validation in the back end as well.
Does anyone know of a good solution for C#? I keep seeing this http://roberto.open-lab.com/2010/03/04/a-html-sanitizer-for-c/, though I'm a little hesitant to use some code from a random blog. Are there any well known plugins? What do most people do in this situation?
You can use HtmlAgilityPack, which is a well maintained library for all things related to HTML tags. A best practice would be to implement a White List, which is a list of allowable tags. This SO question might be exactly what you need:
HTML Agility Pack strip tags NOT IN whitelist
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have around 200 word documents generated with a console application. Which is the better: to store the document as such in database or just store the path in the file system??
Thanks in advance
For 200. What ever you are more comfortable with. You can control locks in the file system but probably easier in the db. If is was 200,000 then would be more reason for file system based on volume.
You should store the file itself on the file system and just the path to each file in the database.
Storing the actual documents' contents in a database is far more work and stress for the server than storing the filename/location on the database. Done properly you will be able to call the contents of the document into HTML or similar no problem.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
My requirement is
Should have a option to attach file in each row of a repeater
Once I clicked to upload, I have to pass a id and need to execute the insert query
Is there any way to do this using ajax asynchronous?
The IDs of the uploader controls are going to be generated dynamically so you're gonna run into the challenge of identifying which upload control it is that you're trying to get a file from. The way I accomplished this was to use jQuery to find the nearest upload control to the button that was clicked. To "tag" the controls, I assigned a dummy css class that could be selected by jQuery. From there, you can build a JSON object to pass to your service or page method for the processing of your insert operation.
There are other options to handle submitting ALL uploader controls, of course, but you weren't very clear on what you've tried or what the bigger picture here is. You didn't give any specifics in your question, so I'm not giving any specifics for an answer. This is just offering a path to take. Good luck.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am looking for an open source tool to help me create mosaic images based on a series of given images. I've been searching the web but couldn't come up with anything web oriented solution.
Do you know any such tools?
Thank you
This might be what you are looking for: http://www.openprocessing.org/sketch/39934
If you download the code and make a new refresh.jpg it should work. The code is written in processing which is very similar to java and can be run as an applet online if the user has java enabled in the browser.
Creating images is normally something you would do on the server side but this might come close to what you are looking for: http://ajaxian.com/archives/mosaic-image-builder-with-ajax
if you just want to show your images in an mosaic way you could use something like masonry: http://masonry.desandro.com/index.html
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I want to generation automatically Resx files for my project, I've heared that there's program which does it.
Can anyone tell me it's name?
The only program I know is Visual Studio. You can easily create your own program by using the ResXResourceWriter class.
As Hans stated, for components such as forms and user controls, you can do this via the "Localizable" property. For other ".resx" files, you can easily create your own localized ".resx" file but it needs to be properly named (you can read up on this - Google for "satellite assemblies" for starters). If your goal is dealing with translations in general however, then unless your app is very small, this approach is difficult, tedious and error-prone (trying to track changed strings on your own for instance, whose existing translations have become obsolete). There are 3rd-party packages that can help you however, and I'm the author of one of them (in the interest of full disclosure). See http://www.hexadigm.com.