Problems passing info to next page

J

JJ297

I have a gridview on a page with the select button generated:

I'm using this to get to the other page:

Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged

Response.Redirect("details1.aspx?Titleid=" &
GridView1.SelectedValue)
End Sub

This only gives me the TitleId. When I tried then wrote this but
getting incorrect string format:

Response.Redirect("details1.aspx?TitleID = " & Title & "&description=
" & GridView1.SelectedValue)

I have three text boxes on the other page to grab what's coming over
in a QueryString but I'm only getting the titleid.

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:TrainUserConnectionString %>"
SelectCommand="SELECT TitleID, Title, Descriptions FROM
dbo.Titles WHERE (TitleID = @TitleID) AND (Title = @title)">
<SelectParameters>
<asp:QueryStringParameter DefaultValue=""
Name="TitleID" QueryStringField="TitleID"
Type="Int32" />
<asp:QueryStringParameter Name="title"
QueryStringField="Title" />
</SelectParameters>
</asp:SqlDataSource>

How do I get the titleand description to appear in the text boxes on
the details1.aspx page?
 
M

Med

Try to remove spaces in the query string. I can see a space after TitleID

try:

Response.Redirect("details1.aspx?TitleID=" & Title & "&description=" &
GridView1.SelectedValue)



Regards


Med
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top