add session variable to querystring in aspx not thru codepage
-
can this be done anyone ? obviously the code below does not work but if someone knows how to embed session varible within querystring in the aspx page that would be awesome. thank anyway ppl something like this :
hyperlinkfield headertext="User Name" datatextfield="username" datanavigateurlformatstring="test.aspx?session("usercode")
-
can this be done anyone ? obviously the code below does not work but if someone knows how to embed session varible within querystring in the aspx page that would be awesome. thank anyway ppl something like this :
hyperlinkfield headertext="User Name" datatextfield="username" datanavigateurlformatstring="test.aspx?session("usercode")
That would be clumsy. Can you generate the formatstring neatly in the codebehind rather than making a spagetti code in the ASPX?
Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
All the world's a stage, And all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts... --William Shakespeare -
That would be clumsy. Can you generate the formatstring neatly in the codebehind rather than making a spagetti code in the ASPX?
Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
All the world's a stage, And all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts... --William Shakespeare -
If you have <asp:hyperlink as a runat server and give an ID to it, you can access the same from codebehind and set is properties in page_load. At runtime, the necessary HTML would be generated for you.
Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
All the world's a stage, And all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts... --William Shakespeare -
can this be done anyone ? obviously the code below does not work but if someone knows how to embed session varible within querystring in the aspx page that would be awesome. thank anyway ppl something like this :
hyperlinkfield headertext="User Name" datatextfield="username" datanavigateurlformatstring="test.aspx?session("usercode")
Hi... try the follwoing datanavigateurlformatstring='"test.aspx?code=""+<%= session("PagePath") %>"' i hope it wil work for u