Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. jgd1234567

    Double Encoding Problem

    Hi, sorry i'll try and explain it better with an example. Say i have the following string: string text = "<strong>Blah</strong> &lt;a href=&quot;test.com&quot;&gt;test&lt;/a&gt; <script>alert('test');</script>"; I want to allow the strong tag but encode the script tag. Therefore i do the...
  2. jgd1234567

    Double Encoding Problem

    Hi, i'm trying to make my website more secure by encoding any output i display. However i still want to allow some html tags. I am using a wysiwyg editor with only bold, italic and underline enabled. I enter my text in the wysiwyg and click submit, the data is then inserted into the database...
  3. jgd1234567

    Custom Web Control Events Problem

    Hi, i'm trying to create my own pager control. I've built very basic web controls in the past but this one is the first where i have had to handle events. So far i have: public class PagerCommandEventArgs : CommandEventArgs { public int Page { get; set; } public...
  4. jgd1234567

    Javascript Injection Security Concerns

    Ok cheers guys. My English sucks so i'm not going to argue. I'll see if can get myself one of them books i guess.
  5. jgd1234567

    Javascript Injection Security Concerns

    Hi, i've always taken security for granted in my websites but i am currently in the process of building a big website where security is of major importance. I understand most of the server side security concerns such as sql injection but with javascript (and ajax) i get a little bit lost. From...
  6. jgd1234567

    Manually throw 404 exception with correct status code

    Hi, I'm trying to make my site more search engine friendly by correctly handling 404 error pages. I have the following in my web.config file: <customErrors mode="RemoteOnly" defaultRedirect="~/Error/500.htm"> <error statusCode="500" redirect="~/Error/500.htm"/> <error statusCode="404"...
  7. jgd1234567

    Databinding Syntax Not Working in ListView LayoutTemplate

    Hi, i can't seem to use databinding syntax within the LayoutTemplate of the ListView control. I have tried: <%# SomeProperty %> but this does not work. In the past i was able to do this fine within the HeaderTemplate of a Repeater control. I modified the above to: <%= SomeProperty %> but...
  8. jgd1234567

    Populate table and maintaining data across postback problem

    Hi i have the following code within a user control to build a table: protected int RowCounter { get { object o = this.ViewState["RowCounter"]; return o != null ? (int)o : 0; } set { this.ViewState["RowCounter"] = value; } } protected void...
  9. jgd1234567

    Setting a property of a control programatically

    Hi, none of the above work: PageSize='<%# Globals.Settings.Content.News.MaximumRows %>' - runs but is simply ignored PageSize='<%= Globals.Settings.Content.News.MaximumRows %>' - error "Cannot create an object of type 'System.Int32' from its string representation '<%=...
  10. jgd1234567

    Get position of tag minus position of parent relative tag

    Hi, I have a couple functions to return the position of a tag. I'm hoping i can then use this to position an absolute positioned tag on top of this tag. However since this returns the position from the edge of the browser, if i have a parent element which has relative positioning the element...
  11. jgd1234567

    Setting a property of a control programatically

    Hi, maybe i'm just being picky/lazy but i'm trying to set the PageSize of my DataPager (which sits within the LayoutTemplate of my ListView). I tried doing: PageSize="<%# Globals.Settings.Content.News.MaximumRows %>" and i received no errors but it simply ignored it. I thought the...
  12. jgd1234567

    Customize DataPager Control

    This definately looks like a bug. I added the following: <asp:NextPreviousPagerField ShowFirstPageButton="false" ShowLastPageButton="false" ShowNextPageButton="false" ShowPreviousPageButton="false" /> To the Fields part of the DataPager and it seems to have done the trick. Cheers again for...
  13. jgd1234567

    Customize DataPager Control

    Hi cheers, I've been looking at the template pager field but it appears as though there is a bug with it. I tried: <asp:DataPager ID="pager" runat="server" PageSize="1" QueryStringField="Page"> <Fields> <asp:TemplatePagerField> <PagerTemplate> <%#...
  14. jgd1234567

    Customize DataPager Control

    Hi, i'm trying to use the DataPager control and i have two problems: 1. It uses the the physical url and not actual url, ie default.aspx instead of default.htm (i use isapi rewrite to rewrite the url) 2. I can't see how i can customize the way the paging works. I can see there is a...
  15. jgd1234567

    C# Help with division

    Hi cheers for your help NeilTrain. I am coming from a php background. I like c# and the compiler can be great but something as simple as division often become abit of a mess.
  16. jgd1234567

    C# Help with division

    Hi, i haven't been programming in c# for long and was wondering how i could rewrite the code below to be alot nice: int width = 100; int height = 130; float ratio = (float)image.Width / (float)image.Height; if ((float)width / (float)height > ratio) width = (int)Math.Round((float)height *...
  17. jgd1234567

    Performance issues with xml fields and pivots

    Hi, cheers for your advice. I don't think i can get around the sub query problem but i will take that into consideration in the future. I removed the function and simply replaced it with the attributes i wanted and it dramatically improved the performance. Thanks for your help.
  18. jgd1234567

    Performance issues with xml fields and pivots

    Anyone? Sorry for being impatient but i have a tight deadline.
  19. jgd1234567

    Performance issues with xml fields and pivots

    Hi, my database has the following tables: Sections: - SectionID (PK) - SectionName Documents: - DocumentID (PK) - SectionID (FK) - Title Attributes: - AttributeID (PK) - SectionID (FK) - AttributeName My site is split into sections ie News, Events etc (stored in the sections table). Each...
  20. jgd1234567

    Image upload using developer api

    Hi, i am building a website which requires my users to upload lots of images. I feel this could clog up the server in terms of bandwidth and space. I was wondering if i could use a third party website to upload my images too via a developer api. However i don't have much experience in this...

Part and Inventory Search

Back
Top