
david7777
Avatar/Signature-
Posts
33 -
Joined
-
Last visited
About david7777
- Birthday 01/08/1983
david7777's Achievements
Newbie (1/14)
0
Reputation
-
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...
-
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!
-
Thanks - Will do...
-
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...
-
Ok, but it would be nice if you could post your solution so that others who have the same problem can learn from it...
-
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
-
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...
-
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?
-
WebService Returns XMLDocument that is a Node
david7777 replied to TheWizardofInt's topic in ASP.NET
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... -
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...
-
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?
-
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...
-
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...
-
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...