Experts...
Yes I'm a rookie here so I'll try to be as clear as possible. I have 2 .aspx pages:
Page 1) products_lookup22.aspx
Page 2) products_EMail.aspx
"Page 1" has a search then a gridview (Like a Summary) that list general information about a product as in:
(Summary)
"Catalog" "Vendor" "Description" "Rec#"
details 77L8453001D ADVANCE 400 WHPS BLST 38
details TQC1110WL GE-ED&C BRKR CIRCUIT 1P10A 1424
details ICQ693MDL330 GE-ED&C OUT MODULE 2A 1674
details IC697PWR711 GE-FANUC 9070 POW SUP 1682
(ETC...)
IF the user clicks on the link "details" we open a "DetailsView" just below the summary grid that provides specifics on just the single record (example: we click "details" for record 38). We see...
(Details)
Vendor: ADVANCE
CATALOG: 77L8453001D
DESCRIPTION: 400 WHPS BLST
NAED V/I: 781087-11529
SOLD BY: EA
IN STOCK: 6
LIST PRICE: $133.66
OK...so far all is fine. Everythings works as advertised. Now what I need to do is 'pass' the value '38' to "Page 2" which has its own "DetailView" to look the record up again; this form will be e-mailed in its entirety via aspNetEMail.
At the bottom of "Page 1" I have hypertext link called "Get Quote...". NavigateURL Code is:
~/products_EMail.aspx?Reco
rdID2=Reco
rdID
When I run it (click on "Get Quote..." hyperlink) the page changes to the following URL and I get the error message:
(URL)
http://localhost:2467/hpoll-dd/products_EMail.aspx?RecordID2=RecordID(ERROR MESSAGE)
Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[FormatException: Input string was not in a correct format.]
System.Number.StringToNumb
er(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +2755599
System.Number.ParseInt32(S
tring s, NumberStyles style, NumberFormatInfo info) +112
System.String.System.IConv
ertible.To
Int32(IFor
matProvide
r provider) +43
System.Convert.ChangeType(
Object value, TypeCode typeCode, IFormatProvider provider) +293
System.Web.UI.WebControls.
Parameter.
GetValue(O
bject value, String defaultValue, TypeCode type, Boolean convertEmptyStringToNull, Boolean ignoreNullableTypeChanges)
+264
System.Web.UI.WebControls.
Parameter.
get_Parame
terValue()
+66
System.Web.UI.WebControls.
ParameterC
ollection.
GetValues(
HttpContex
t context, Control control) +254
System.Web.UI.WebControls.
SqlDataSou
rceView.In
itializePa
rameters(D
bCommand command, ParameterCollection parameters, IDictionary exclusionList) +274
System.Web.UI.WebControls.
SqlDataSou
rceView.Ex
ecuteSelec
t(DataSour
ceSelectAr
guments arguments) +754
System.Web.UI.DataSourceVi
ew.Select(
DataSource
SelectArgu
ments arguments, DataSourceViewSelectCallba
ck callback) +17
System.Web.UI.WebControls.
DataBoundC
ontrol.Per
formSelect
() +149
System.Web.UI.WebControls.
BaseDataBo
undControl
.DataBind(
) +70
System.Web.UI.WebControls.
DetailsVie
w.DataBind
() +4
System.Web.UI.WebControls.
BaseDataBo
undControl
.EnsureDat
aBound() +82
System.Web.UI.WebControls.
DetailsVie
w.EnsureDa
taBound() +181
System.Web.UI.WebControls.
CompositeD
ataBoundCo
ntrol.Crea
teChildCon
trols() +69
System.Web.UI.Control.Ensu
reChildCon
trols() +87
System.Web.UI.Control.PreR
enderRecur
siveIntern
al() +50
System.Web.UI.Control.PreR
enderRecur
siveIntern
al() +170
System.Web.UI.Control.PreR
enderRecur
siveIntern
al() +170
System.Web.UI.Page.Process
RequestMai
n(Boolean includeStagesBeforeAsyncPo
int, Boolean includeStagesAfterAsyncPoi
nt) +2041
--------------------------
----------
----------
----------
----------
----------
----
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
At the top of "Page 2" I dimension "RecordID2" as in:
Dim RecordID2 As Int32
The "Page 2" datasource and query is:
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:IDC_Rece
iving %>"
SelectCommand="SELECT [CTMFGNAME], [CTSTOCK], [CTDESCRIPTION], [DISTSKU], [CTUM], [COMMODITYNAME], [RecordID] FROM [Cooper-Master-Items-Table
] WHERE (([IDCPROVIDERCODE] = @IDCPROVIDERCODE) AND ([RecordID] = @RecordID2))">
<SelectParameters>
<asp:Parameter DefaultValue="IDC001" Name="IDCPROVIDERCODE" Type="String" />
<asp:QueryStringParameter Name="RecordID2" QueryStringField=RecordID2
Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
OK...SO
If I run this from "Page 1" I get the error message "Input string was not in a correct format."
If I run "Page 2" standalone as in URL "
http://localhost:1905/hpoll-dd/products_EMail.aspx?recordid2=38" it displays fine...
Again...'a newbie' so Any feedback would be appreciated...
Thanks in advance!
DM