Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > xml and hyperlinks within context

Reply
Thread Tools

xml and hyperlinks within context

 
 
Jimbo
Guest
Posts: n/a
 
      11-10-2005
Hey

Have a real problem here.

I have a page that consists of a lot of div tags and everything on the
page is made in controls.

In one of the controls we call a method in another class that produces
some XML, In the end of that method we call transform to render the xml
ive built up in .net into HTML from the xsl stylesheet. The output is
rendered to the users browser.

So far this is a pretty standard way to produce i page i think. A
control calling a class, producing XML and transforming the XML into
HTML using a XSL stylesheet.

What i want to do is building a tree structure out of the information
in XML, and for this i put a hyperlink on every "+" or "-" sign. This
hyperlink links to the same page, but for some reason, when i come back
to that page all my Context.Items are gone!

Why?

Hope you can help.


Jimmy

 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      11-10-2005
HttpContext.Items is a per-request property bag. Once the page is rendered
and sent back to the client The HttpContext and its Items are gone. A new
request (or a postback) creates a new instance of the HttpContext, Request,
Response, Items and other objects. What are you trying to do with the HttpContext.Items?

-Brock
DevelopMentor
http://staff.develop.com/ballen

> Hey
>
> Have a real problem here.
>
> I have a page that consists of a lot of div tags and everything on the
> page is made in controls.
>
> In one of the controls we call a method in another class that produces
> some XML, In the end of that method we call transform to render the
> xml ive built up in .net into HTML from the xsl stylesheet. The output
> is rendered to the users browser.
>
> So far this is a pretty standard way to produce i page i think. A
> control calling a class, producing XML and transforming the XML into
> HTML using a XSL stylesheet.
>
> What i want to do is building a tree structure out of the information
> in XML, and for this i put a hyperlink on every "+" or "-" sign. This
> hyperlink links to the same page, but for some reason, when i come
> back to that page all my Context.Items are gone!
>
> Why?
>
> Hope you can help.
>
> Jimmy
>



 
Reply With Quote
 
 
 
 
Jimbo
Guest
Posts: n/a
 
      11-17-2005
Ah i see.

Think my problem is that i thought it would stay put in the context
items no matter how many postback/requests i made. Guess i was wrong.

Im building a HTML page through an XML styelsheet. This HTML is
displayed to the user. Its actually a tree structure, so the user can
press + or - to expand, or the reverse, each line of text. Much like in
Windows explorer. I just have to keep track on wich + were pressed and
reload the values like userid and that sort of stuff so the page can be
rendered properly again.

Guess i just have to refill the context.items and my problem will be
solved.

Also i can see that viewstate is used. Like viewstate[Userid]. Isnt
that permanent values or is the viewstate deleted as well on every
request/postback to the page?

Thanks


Jimmy

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I find the webapp name from within a context without changingweb.xml? christopher@dailycrossword.com Java 1 04-22-2008 04:07 PM
dealing with nested xml within nested xml within...... Ultrus Python 3 07-09-2007 09:00 PM
setTimeout within the context of an Object loses context. -Lost Javascript 7 03-24-2007 12:14 AM
hyperlinks within Excel with POI VadimGor Java 8 05-22-2005 03:35 PM
changing hyperlinks within item templates at runtime Paul ASP .Net 1 04-08-2004 04:51 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57