-
Posts
6,787 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by aspnetguy
-
but how does that protect from anyone getting in and editing your content?
-
Thanks for the help but I figured out a way without Regex. <%@ Page Language="C#" ValidateRequest="false"%><%@ Import Namespace="System.Text.RegularExpressions" %><%@ Import Namespace="System.Text" %><script runat="server"> private void Page_Load(object sender, EventArgs e) { txtInput.TextMode = TextBoxMode.MultiLine; txtOutput.TextMode = TextBoxMode.MultiLine; } private void btnClick(object sender, EventArgs e) { string input = txtInput.Text; input = input.Replace("<script","~<script").Replace("</" + "script>","</" + "script>~"); string[] parts = input.Split('~'); StringBuilder sb = new StringBuilder(); foreach(string part in parts) { if(part.IndexOf("<script") == -1) sb.Append(part.Replace("{","<%=").Replace("}","%>")); else sb.Append(part); } txtOutput.Text = sb.ToString(); }</script><html><head> <title></title></head><body><form runat="server" method="post"> <div>Input:</div> <asp:textbox id="txtInput" runat="server" style="width:400px;height:150px"/> <br><br> <div>Output:</div> <asp:textbox id="txtOutput" runat="server" style="width:400px;height:150px"/> <br><br> <asp:button id="btnFilter" text="Filter" runat="server" OnClick="btnClick"/></form><!----------------------------------SAMPLE INPUT-----------------------------------------{sText}<br><script src="somewhere/file.js"></script><script>function name(){ //js code}</script>{sText2}<br><div>{sImage1}</div><script> function name2() { //more code }</script>{sText3}--------------------------------------END SAMPLE INPUT------------------------------------></body></html>
-
thank you that helpos however I should have given a better example. It could be like this <div>{sImage1}</div><script> function myFunction() { //some js code }</script><div>{sText1}<br><br>{sText2}<br><br>{PhotoGallery}</div> or even have multiple <script></script> mixed throughout the string.thank you though
-
use 0 for no and 1 for yes insteadie. status=0
-
I have a string that could be like the following <script> function myFunction() { //some js code }</script><div>{sText1}<br><br>{sText2}<br><br>{PhotoGallery}</div> Note: this is a string variable. I need to write a regular expression to replace all { & } with <%= & %> but it can't touch anything between <script></script>Any help would be appreciated.
-
I agree I love 2.0 too...I just don;t understand why I have problems at work but not at home...but then again Opera 9 is quirky at work but not at home too...my guess is terminal services has something to do with it.
-
2Gb of ram, not sure what the issue is but hopefully whenever the next update comes out it will be gone.I have heard some bad stuff about Vista already but none is first hand so I can't say for sure. I will be waiting quite a while before I bother. I have no need to upgrade now so I will save my money.
-
closing FF with the task manager then reopening does preserver the open tabs.I did find also a the same time when I lose clipboard I cannot use CTRL+Home to goto the top of the page, CTRL+End still works to go tot he bottom tho??? Wierd.Skemcin what OS are you running it on. Mine is on a windows server 2003 terminal server. I connect with a thin client and everything is managed on the server....maybe it is a terminal services issue?I have never had this problem at home on Win XP pro
-
okay I'll try that, thanks.
-
Is anyone using this version of Firefox?About every hours or so I lose the ability to use the Firefox clipboard (copy and paste). If I close it and reopen it works again for about an hour.I use tabs frequently and usually have 5 or 6 tabs open.Having to close it and open it all the time is annoying...I don't if this is the same bug that was supposed to be fixed in 1.5.0.4 or if it is being caused by something new. Anyone have this problem???I have reverted to 1.5.0.8 for now and have no problems.
-
thanks, i'll do that
-
Not if I can hack in and repoint it to MS first, lol...Disclaimer: I really don't hate microsoft's products...I just hate how they have their hands in your wallet every chance they get
-
Yes this is true. My father in law looked at his house on Google Maps (Google Earth appears to use the same images) and in the pictures was a small shed that they had torn down almost 2 years ago :)Not sure who they buy these pictures from...maybe Google has their own satalite by now
-
Don't know specifically but I've heard they use C++ and Python
-
I think it means markup...CFML - cold fusion markup language...it is just a short extention like .htm
-
what the 12 of february...I know it is not in US format....I'll change it be less confusing.
-
Yes marketing...my least favorite part . I have already got and finished my first contract (generated by the site) through getacoder.com and I have one at scriptlance that is looking promising. Before I go to far though I have to clarify somethings at work...I am meeting with my boss to clear up some of the fuzzy lines in my contract regarding freelancing. I am sure we can find some middle ground as our company only deals with CMS work.
-
view_topic.php is the page it gets the id and goes to the database and loads the data on view_topic.php. When there is a different id it loads different data. That is what we have been trying to explain to you...that is a dynamic page.
-
I use TurboDbAdmin http://www.turboajax.com/turbodbadmin/ but that requires you to write most of your queries but has a nice interface
-
you need to install a counter on your page. there are lots of free ones our you can make your own.
-
ok I fixed it and made the site live http://www.aspnetguy.com