I apologise if I am getting this all wrong, but why are you not trying to use the page load event? I mean you are at the end setting the querystring value to a Server side control, So why not execute it on the page load event.
Hope this helps to solve your problem.
Good Luck [yes]
Regards
Vineed
"Kind words are short and easy to speak, but their echoes are truely endless" - Mother Teresa
kaushalparik...
All-Star
26568 Points
3688 Posts
MVP
Access QueryString Object in ASPX Page
Jan 10, 2008 02:03 AM|LINK
Can anybody help me with: "how do i access QueryString Object in ASPX page?"
[KaushaL] || BloG || Twitter
Don't forget to click "Mark as Answer" on the post that helped you.
pinakin2in
Member
653 Points
151 Posts
Re: Access QueryString Object in ASPX Page
Jan 10, 2008 02:27 AM|LINK
// "?action=view§ion=info&id=123&debug"
var url = location.search;
// 123
var id = $.query.get('id');
// true
var debug = $.query.get('debug');
// 123
var idAlso = $.query['id'];
// "?action=do§ion=5&id=123"
var newUrl = $.query.set("section", 5).set("action", "do").toString();
// "?action=view§ion=info&id=123&type=string"
var newQuery = "" + $.query.set('type', 'string');
// "?action=view§ion=info&id=123"
var oldQuery = $.query.toString();
// ?action=view§ion=info&id=123
var oldQuery2 = $.query;
// ?action=view§ion=info&id=123&type=string
var newerQuery = $.query.set('type', 'string', true);
// "?action=view§ion=info&id=123&type=string"
var notOldQuery = $.query.toString();
// ?action=view§ion=info&id=123
var oldQueryAgain = $.query.set("type", null, true);
// ""
var emptyQuery = $.query.empty();
// ?action=view§ion=info&id=123
var stillTheSame = $.query.copy();
Pinakin Patel
kaushalparik...
All-Star
26568 Points
3688 Posts
MVP
Re: Access QueryString Object in ASPX Page
Jan 10, 2008 03:40 AM|LINK
i tried as..
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Request.QueryString["CategoryID"] %>'></asp:TextBox>
but it is not working./.
[KaushaL] || BloG || Twitter
Don't forget to click "Mark as Answer" on the post that helped you.
Arisen Phoen...
Member
244 Points
54 Posts
Re: Access QueryString Object in ASPX Page
Jan 10, 2008 03:49 AM|LINK
Do it in the code behind...
Arisen Phoen...
Member
244 Points
54 Posts
Re: Access QueryString Object in ASPX Page
Jan 10, 2008 03:50 AM|LINK
{
TextBox1.Text = Request.QueryString["CategoryID"].ToString(); ;}
kaushalparik...
All-Star
26568 Points
3688 Posts
MVP
Re: Access QueryString Object in ASPX Page
Jan 10, 2008 03:52 AM|LINK
that is the restriction.... i am not suppose to in code behind... i have to do it in ASPX page only./.
[KaushaL] || BloG || Twitter
Don't forget to click "Mark as Answer" on the post that helped you.
vineed_menon
Contributor
2027 Points
415 Posts
Re: Access QueryString Object in ASPX Page
Jan 10, 2008 03:55 AM|LINK
Hi,
I apologise if I am getting this all wrong, but why are you not trying to use the page load event? I mean you are at the end setting the querystring value to a Server side control, So why not execute it on the page load event.
Hope this helps to solve your problem.
Good Luck [yes]
Regards
Vineed
Arisen Phoen...
Member
244 Points
54 Posts
Re: Access QueryString Object in ASPX Page
Jan 10, 2008 03:56 AM|LINK
Request.QueryString("values")(1)
Arisen Phoen...
Member
244 Points
54 Posts
Re: Access QueryString Object in ASPX Page
Jan 10, 2008 03:58 AM|LINK
Request.QueryString("values")(1)
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Request.QueryString("values")(1) %>'></asp:TextBox>
SHOULD WORK :-)
kaushalparik...
All-Star
26568 Points
3688 Posts
MVP
Re: Access QueryString Object in ASPX Page
Jan 10, 2008 03:59 AM|LINK
i am not suppose to in code behind... i HAVE to do it in ASPX page only./.
[KaushaL] || BloG || Twitter
Don't forget to click "Mark as Answer" on the post that helped you.