Technically, from what I see here, you have it setup correctly (unless I missed something here). However, I have a few questions:
- The page that has this code, does it have the parameter labeled "Cngld" in the url? - If it does have the parameter, is it blank, null, or listed as ""? - Is the new page pulling the parameter you're sending across and retrieving your information? What is the error you're getting? I ask you this because if you have your current url listed as "http:// indexCNG.aspx", getting a Request.QueryString of any kind will give you an error, as there is no parameter on the current link. This will mess you up because you can't pass "CngId" since it doesn't exist. If your current url is listed as "http://indexCNG.aspx?CngId=" where CngId doesn't equal anything, youre request.querystring is going to pass a blank (or is it null) value to new link. Assuming you're using C#, I would do the following for starters: 1) I would make sure that the current url has a reference to CngID before you even attempt to get a request.queryString. If you don't, none of the following, let alone the rest of your code, will work, as CngID will not exist. 2) I would then make sure you're getting a valid result when you're pulling a request.querystring for starters. Example? On your code behind, throw a response.write(hypviewcng.navigateUrl) or something to see what the result is. 3) I would also click on the link and see if it gets the value you're expecting into the url. If the displayed URL isn't what you were intending to show, then you know you didn't set it up right either. Once you're done, you should be able to pull your query on the new page and get your information. Hopefully, this gets you started. m...@ni, let me know if this helps or if I misunderstood your statement. Cerebrus, if I've missed something or messed this up, let me know too. LOL On Dec 29, 9:55 am, "m...@ni" <[email protected]> wrote: > Hi Cerebrus how ru?? > > Thanks for showing concern,actualy i just want to use the value of > querystring in hyperlink control,and that hyperlink control is placed > on html side,actualy after using my aesthetic sense i came up with > this solution. > > ___On Html Side.___ > <asp:HyperLink ID="HYPViewCng" Target="_blank" runat="server" >View > Cngs</asp:HyperLink> . > > ___On Code Behind___ > int CngId = int.Parse(Request.QueryString["CngId"].ToString()); . > HYPViewCng.NavigateUrl = "~/Admin/CngSection/ViewCng.aspx?CngId=" + > CngId; > > Thanks for suporting me alot, i realy apreciate ur responses.Thanks > Alot................
