Mariyam
asked on
Input String Was Not In Correct Format VS.Net 2.0
Hi,
I am using a gridview to display records with a hyperlink to the detail page. In the previous version the datagrid contained a field in which you entered the parameter value you wanted to pass. I don't see one in this control, so how do I properly set the control to pass the following information in the querystring (or is this even correctly written):
Results.aspx?KBID={0}
Also, I noticed in the page load on my Results.aspx page, that the QueryString value is NULL even though it displays the proper value in the address bar. At what point is the QueryString available? My app is written in ASP.Net 2.0 in C#.
TIA
-Mari
I am using a gridview to display records with a hyperlink to the detail page. In the previous version the datagrid contained a field in which you entered the parameter value you wanted to pass. I don't see one in this control, so how do I properly set the control to pass the following information in the querystring (or is this even correctly written):
Results.aspx?KBID={0}
Also, I noticed in the page load on my Results.aspx page, that the QueryString value is NULL even though it displays the proper value in the address bar. At what point is the QueryString available? My app is written in ASP.Net 2.0 in C#.
TIA
-Mari
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thanks, they both worked.
Regarding the problem above, I provided a value for the DataTextField but neglected to provide one for the DataNavigateURLField.
Regarding the problem above, I provided a value for the DataTextField but neglected to provide one for the DataNavigateURLField.
ASKER
GridView - GridView1
There was an error rendering the control. Databinding expressions are only supported on objects that have a DataBinding event. System.Web.UI.WebControls.
When to enter it directly into the html page it said I can't use a code block there.
Prior to attempting to retrieve the KBID from the querystring the page after loading would display this URL:
http://localhost:3799/ITKnowledgeBase/Results.aspx?KBID=1
The KBID values change as appropriate but this command in Results.aspx page load returned a null value:
KBID = Convert.ToInt32(Request.Qu
The exact exception is as follows:
[FormatException: Input string was not in a correct format.]
System.Number.StringToNumb
System.Number.ParseInt32(S
System.String.System.IConv
System.Convert.ChangeType(
System.Web.UI.WebControls.
System.Web.UI.WebControls.
System.Web.UI.WebControls.
System.Web.UI.WebControls.
System.Web.UI.WebControls.
System.Web.UI.DataSourceVi
System.Web.UI.WebControls.
System.Web.UI.WebControls.
System.Web.UI.WebControls.
System.Web.UI.WebControls.
System.Web.UI.WebControls.
System.Web.UI.Control.Ensu
System.Web.UI.Control.PreR
System.Web.UI.Control.PreR
System.Web.UI.Control.PreR
System.Web.UI.Page.Process
Thanks.