Jump to content
Xtreme .Net Talk

david7777

Avatar/Signature
  • Posts

    33
  • Joined

  • Last visited

Everything posted by david7777

  1. mark007, the transfer statement does the same thing... I already tried that. bri189a - I agree, but things are made very difficult when using multi output with .net. What I mean is that I am using the same page to output either normal HTML using web controls etc, or output XML, depending on the querystring. The problem here is that the viewstate and other default hidden fields that .net includes in the page can not be taken out of the page. If you have a <form runat="server"> tag in the page, the hidden tags will always be there, and this will of course mess up any XML structure I ouptut. For that reason, I tried to redirect to another page to output the XML. I guess I will just need to create two seperate pages for the different output or something...
  2. I have the following problem: I am currently implementing AJAX (Asynchronous Javascript And Xml) into certain areas of my website. Anyway - it uses the JavaScript XmlHttpResponse object to send and receive data to and from the server without having to post back the page. Everything is working great, until I try to use a Response.Redirect() on the server side. Here is my example: I have a content page which is access restricted to registered users, and this is how it SHOULD work: 1. The page (RestrictedPage.aspx) loads an empty template. 2. Once loaded, I use the JavaScript XmlHttpResponse object to fetch content to fill the template (without reloading the page). I request data from, lets say, content.aspx 3. content.aspx first checks to see that the user is logged in - 3.1) Not logged in - it redirects to an appropriate page to output the "access denied" XML - 3.2) Logged in - Redirects to appropriate page to output XML content 4. Now the info is returned to the XmlHttpResponse object on the client side (RestrictedPage.aspx). 5. I use JavaScript to work with the XML, and do appropriate things depending on what the returned XML is... (like tell the user to log in, or use DOM objects to fill the template with content) All of this works great WITHOUT redirects involved. My problem is that as soon as I use Response.Redirect() in step 3.1 or 3.2 above, instead of just the XmlHttpResponse URL redirecting, the actual client is redirected, and the browser loads what should be loading in the XmlHttpResponse object... I have a feeling there is no work around, but if anyone knows why this happens, please let me know!?? Thanks!
  3. Thanks - Will do...
  4. I have tried to disable all viewstates but the viewstate hidden field is still used... I realise that I dont really need to use asp controls, but I am working with their properties on the server side - Maybe I can just use normal form controls and make them server side so that i can still access their properties..? As long as i have <form> tags in my page though, I assume that the standard hidden fields will still show, no matter what I have within the form tags...
  5. Ok, but it would be nice if you could post your solution so that others who have the same problem can learn from it...
  6. These custom error pages are set up in IIS - Go check the following links: http://www.windowsitpro.com/Articles/Print.cfm?ArticleID=20001 http://www.aspnetresources.com/articles/CustomErrorPages.aspx http://support.microsoft.com/?id=834452
  7. Could you send us a code snippet of the HTML produced? ie- only the code around and including the button that is giving the problems...
  8. Is it possible to output only the generated HTML of an asp.net page? e.g: I have asp labels and other controls which I work with on the server side. When output to the client, it always includes form tags with all the default hidden viewstate and other fields... I don't want any of those fields or any of the auto generated JavaScript in the output. I know I can use response.clear and response.write to output exactly what I want, but my problem is that I want asp.net to generate the HTML for me. Is it possible to get the generated HTML for a page before it gets to the client? I don't need any viewstate enabled. So that you know, the reason I am doing this is because I am integrating Asynchronous JavaScript and XML (AJAX) into my website. I will have a template with the serverside forms and hidden fields etc, and content will be dynamically loaded into this template... So the client will only load the template, and then according to user input, content will be loaded into the template without posting back by using AJAX. If I do this, I cant have JavaScript and form tags in the content to be dynamically loaded into the template... I hope I am being clear..? Any suggestions?
  9. You need a root node - All XML documents need root nodes... ie: <UserList> <Users> <UserName> User1 </UserName> </Users> </UserList> Although, a better XML structure would be something like: <UserList> <User> <UserName> User1 </UserName> <FirstName> Bob </FirstName> <LastName> Smith </LastName> </User> </UserList> This way you can have multiple values for each user - makes things more flexible if you want to extend the amount of information you store in the file...
  10. I really would suggest that you avoid using JavaScript to accomplish this. I personally use MasterPage templates for my site which makes it very easy to dynamically change the title. If you dont want to do this, rather have a server side variable called PageTitle or something, and set it in your PageLoad. Then in your .aspx file, you can have <head><title><%=PageTitle%></title></head> I havent tried this, but it should work...
  11. not by just using ASP.net. You would need to use JavaScript to capture the position of the cursor, and then send that information when you post the data to the server. Why would you want to do this though?
  12. This would best be done with DHTML using JavaScript... There are Alpha channels you can use to change the look of the image when the user hovers over it, but that is browser specific... What I would suggest is have the image in a TABLE or DIV slightly bigger than the image, so it has a border around it, with the background color set to say, blue. Then you will need to add some javascript to the "OnMouseOver" event to change the background color to red or something... Go check out http://www.w3schools.com to learn about DHTML, JavaScript, the HTML DOM and CSS...
  13. Only problem with this is if the user has disabled JavaScript... But then again, most websites nowdays use a lot of JavaScript and assume it will be available...
  14. It is not possible to get them working together - VS 2003 is partly based on the .net 1.1 framework, so will only work with that version. Just like VS 2002 can't work with .net 1.1...
  15. I am trying to bypass simple proxy filtering, which by my understanding is not illegal or anything (please let me know if I am wrong). I want to create this application as an addition to my current site, in order to attract visitors. I hosted a PHP OpenSource version for a while, but the bandwidth it used was way too much. (Up to 18Gb in a week!) I dont know PHP, so I thought I would create a .net version so that I could filter out certain sites - I dont want people surfing porn or anything through this. Also - i want users to register with me before they can use the app, so that i can limit bandwidth per user if need be...
  16. I am trying to write a small web application to do the following: You want to browse a URL "http://www.google.com". You enter this URL in a form. (In Form.aspx or whatever) The form will do a basic encryption on the URL (like shift each character one way, like "H" becomes "I" etc.), then redirect to another page with a link like this: "http://www.mydomain.com/View.aspx?url=iuuq://xxx.hpphmf.dpn" Now View.aspx will decrypt the given URL to "http://www.google.com", it will read the requested page using the following: Dim myClient As WebClient = New WebClient() Dim response As StreamReader = new StreamReader(myClient.OpenRead("http://www.google.com")) So now I have the page contents in a stream reader. Now I want to go through the contents and encrypt all links (same encryption as above), then output the page to the viewer. Now it gets harder: All links on the page being viewed should now point to "http://www.mydomain.com/View.aspx?url=xyxyxyx", where "xyxyxyx" is the encrypted link. If the link is to a binary file, like an image or something, how do I output that normally without going through the whole encryption/decryption process? So View.aspx should be able to output ANY webpages with all links encrypted, as well as normal binary files like images etc. Any help would be appreciated!
  17. I have developed a program which compresses JPG files, and creates an XML file to link images to keywords etc. Once the user has entered all info, they can save to disk, or upload to the internet. To upload to the internet, I have used FTP. I have used the "edtftpnet" version 1.1.4 assembly for this. To upload, I have decided to upload each individual file seperately, as uploading one large file may cause problems. Each image can be between 60kb and 250kb. Any number of images can be uploaded, but normally no more than 100 at a time. First of all - is this the best approach? Secondly, I am getting problems with the FTP - I am loosing connection while uploading. If this happens, not all the files are uploaded, and i need to manually upload them without my program. How can i prevent this, or make sure that all images are uploaded? (Assuming no hardware problems or no physical connection to the internet is lost) Thirdly - this program is going to be used by a few people (maximum 10), so i would like to know of potential security issues of using standard FTP.
  18. Sorry - I found the answer in the following thread: http://www.xtremedotnettalk.com/showthread.php?t=49447
  19. How do I add an item with text AND value to a combobox? I know i can add an item by using comboxox.items.add("text"), but I want to be able to add an assiociated value to the text so that i can get combobox.SelectedValue - This value must not be displayed. How do i do this?
  20. It is a shared host - No, unfortunately i don't have physical access...
  21. I have developed a site, and continue to experience the random problem of my server returning a "no response" when trying to connect to the website. The frustrating thing is that it seems totally random, and i can't pin-point it to anything. I thought that it was my server, and complained every time the site went down. The thing is, the site went down a short while ago, but when i went to a subdomain, of which the site content is stored in a directory on the same server, it worked fine. So that tells me that it is not my server, but rather the main site. To explain, it is set up that http://www.spotted-productions.com is stored in the ../wwwroot/ folder, and phproxy.spotted-productions.com is stored in ../wwwroot/phproxy/. Say for instance that the site crashes when i am viewing http://www.spotted-productions.com/default.aspx, then i can not go to anything in that domain - no matter what i try access in http://www.spotted-productions.com, but i can easily veiw pages on phproxy.spotted-productions.com. This normally only last for about 5 - 10 minutes at a time, after which i can access the main site again. What could be causing the problem?
  22. Yes - I've done that and it works, thanks...
  23. I have written most of the functionality for a program - I have just included a "Settings" form. I have now decided to make the main form a splash screen which will load all data and check that settings are there. While this is being done, a simple status text will tell the user what is happening... eg: "Checking FTP Settings...", "Loading Main Program..." etc. So the splash screen will start. on load, it will check to see if the settings file is there. If not, it means the program is running for the first time, or the file has been deleted, so i need to force the user to enter the settings again. The splash screen must still be in the background, with my settings form now displaying. The user must then enter details, and click the "Save" button. Only once that is done, must the splash screen continue with processing of the main program. My question is, how do i wait for a process to be complete before carrying on with the next step??
  24. Maybe you could provide a more complex XML structure - so that we can understand your problem more clearly?
×
×
  • Create New...