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 dencom 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: *

  • Users: jgd1234567
  • Content: Threads
  • Order by date
  1. 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...
  2. 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...
  3. 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...
  4. 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"...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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 *...
  11. 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...
  12. 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...
  13. jgd1234567

    Problem with foreign key multiple table reference

    Hi, i have the following tables:- NewsArticles (for my news section): - ArticleID (PK) - Message ... Products (for my products section): - ProductID (PK) - Title ... I need to add a comments facility to both my news and products sections. I don't wish to create seperate tables for each as i...
  14. jgd1234567

    Help with User Defined Function

    Hi i have a user defined function (called IsValid) which has one parameter and returns a bit. I need to create a sql statement which returns any rows in a table where the function returns 1 based on the inputted value, ie SELECT * FROM Groups WHERE dbo.IsValid(GroupID) = 1 But the above does...
  15. jgd1234567

    Possible problem with strtotime returning incorrect date

    Hi, i have a fantasy manager site with football players. The players are stored in the following table: players: - player_id - transfer_player_id (if not 0 then then the player has been transferred) - date_created (date the player was added) Every week i run a script which runs through all...
  16. jgd1234567

    Problems with template property in custom web control

    Hi, i have created my own custom repeater which inherits from the standard repeater and the only difference is that it contains an EmptyDataTemplate. public class Repeater : System.Web.UI.WebControls.Repeater { private ITemplate _emptyDataTemplate; [Browsable(false)]...
  17. jgd1234567

    Avoid having to use find control every time

    Hi i have a nested control i need to call in about 6 different methods. Therefore at the top of every method i have: ListBox lbxLeftColumnAdverts = (ListBox)fvwDocument.FindControl("lbxLeftColumnAdverts"); Is it not possible to add a private variable to access this control. I tried placing...
  18. jgd1234567

    Problems updating cookies

    Hi, i'm having some problems updating cookies. I have the following code when a user submits a comment: Response.Cookies["Comment"]["FullName"] = txtFullName.Text; Response.Cookies["Comment"]["Email"] = txtEmail.Text; Response.Cookies["Comment"]["Url"] = txtUrl.Text...
  19. jgd1234567

    Writing template property in render method of web control

    Hi, i'm trying to add no data template to the repeater control. I am following the article at: http://weblogs.asp.net/acampbell/archive/2004/06/19/159780.aspx Basically i add a property to the repeater: [Browsable(false)] [PersistenceMode(PersistenceMode.InnerProperty)] public ITemplate...
  20. jgd1234567

    Calling a method using reflection

    Hi, i'm trying to build my own pager control. I have added a property called DataSourceID which allows me to access the ObjectDataSource on the page. However in my control i need to call the "SelectCountMethod" from the type "TypeName" specified by the object data source to return the number...

Part and Inventory Search

Back
Top