Click here to Skip to main content
15,927,744 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Question[Urgent ] How to put the output of an aspx file to a pdf Pin
Big Ralph13-Sep-07 20:53
Big Ralph13-Sep-07 20:53 
QuestionWindows Vista Pin
VenkataRamana.Gali13-Sep-07 19:47
VenkataRamana.Gali13-Sep-07 19:47 
AnswerRe: Windows Vista Pin
\laddie13-Sep-07 20:51
\laddie13-Sep-07 20:51 
QuestionSQL Server 2000 database 'bit' type problem. [modified] Pin
-- Abhi --13-Sep-07 19:36
-- Abhi --13-Sep-07 19:36 
AnswerRe: SQL Server 2000 database 'bit' type problem. Pin
\laddie13-Sep-07 21:00
\laddie13-Sep-07 21:00 
Questionpassport authentication Pin
Sonia Gupta13-Sep-07 19:07
Sonia Gupta13-Sep-07 19:07 
AnswerRe: passport authentication Pin
N a v a n e e t h14-Sep-07 21:58
N a v a n e e t h14-Sep-07 21:58 
Questionserver.transfer gridview DataKeys from 1st page to 2nd page, lost values on postback? Pin
jake williamson13-Sep-07 19:01
jake williamson13-Sep-07 19:01 
hey out there, this is driving me nuts!

i'm trying to transfer a number of 'DataKeys' from one page to a second page. i can get the values to come across using 'Server.Transfer' but when a button on the receiving page is clicked (causing a postback), the url changes and i lose the values.

how do i keep them?! it's a simple 'post page ones values to page two, perform a search on page two by clicking a button, select an option and go back to the 1st page' kinda thing.

on my initial page i've a gridview:

<asp:GridView ID="GridView1" runat="server" OnRowCommand="GridView1_onRowCommand" DataKeyNames="UserID,FirstName" AutoGenerateColumns="False">

<Columns>

<asp:BoundField DataField="userid" HeaderText="userid" />

<asp:BoundField DataField="firstname" HeaderText="firstname" />

<asp:TemplateField>

<ItemTemplate>

<asp:Button ID="btnSearchPage" runat="server" Text="Button" CommandName="gotoSearchPage" CommandArgument='<%# Container.DataItemIndex %>' />

</ItemTemplate>

</asp:TemplateField>

</Columns>

</asp:GridView>

and this is my 'OnRowCommand' command:

Protected Sub GridView1_onRowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs)<br />
<br />
	'grab the row info<br />
	Dim strCmdName As String = e.CommandName.ToString<br />
	Dim intDataItemIndex As String = e.CommandArgument.ToString<br />
<br />
	'get the row details<br />
	Context.Items("UserID") = GridView1.DataKeys(intDataItemIndex).Item("UserID")<br />
	Context.Items("FirstName") = GridView1.DataKeys(intDataItemIndex).Item("FirstName")<br />
<br />
	If (strCmdName = "gotoSearchPage") Then<br />
<br />
		Server.Transfer("~/searchPage.aspx", True)<br />
		<br />
	End If<br />
<br />
End Sub


on my receiving page 'searchPage.aspx' i can get the DataKeys using this in the page init:

Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init<br />
        <br />
If (Not IsPostBack) Then<br />
			<br />
intFacilityID = Context.Items("FacilityID")<br />
			<br />
End If<br />
<br />
End Sub


but the moment i click the search button, the url changes and hey presto - no more data keys?!

this must be possible?!

any suggestions would be great,

cheers,

jake
QuestionProblem with filepath while reading to filestream Pin
anujose13-Sep-07 18:18
anujose13-Sep-07 18:18 
AnswerRe: Problem with filepath while reading to filestream Pin
Imran Khan Pathan13-Sep-07 18:36
Imran Khan Pathan13-Sep-07 18:36 
GeneralRe: Problem with filepath while reading to filestream Pin
anujose13-Sep-07 19:18
anujose13-Sep-07 19:18 
AnswerRe: Problem with filepath while reading to filestream Pin
Guffa13-Sep-07 19:32
Guffa13-Sep-07 19:32 
GeneralRe: Problem with filepath while reading to filestream Pin
anujose13-Sep-07 19:34
anujose13-Sep-07 19:34 
GeneralRe: Problem with filepath while reading to filestream Pin
anujose13-Sep-07 19:41
anujose13-Sep-07 19:41 
GeneralRe: Problem with filepath while reading to filestream Pin
Sandeep Akhare13-Sep-07 20:53
Sandeep Akhare13-Sep-07 20:53 
GeneralRe: Problem with filepath while reading to filestream Pin
Guffa14-Sep-07 7:28
Guffa14-Sep-07 7:28 
AnswerRe: Problem with filepath while reading to filestream Pin
Blue_Boy13-Sep-07 20:53
Blue_Boy13-Sep-07 20:53 
GeneralRe: Problem with filepath while reading to filestream Pin
Sandeep Akhare13-Sep-07 20:57
Sandeep Akhare13-Sep-07 20:57 
GeneralRe: Problem with filepath while reading to filestream Pin
Blue_Boy13-Sep-07 21:05
Blue_Boy13-Sep-07 21:05 
Questionadding a property in the class Pin
I Never Look Behind13-Sep-07 17:50
I Never Look Behind13-Sep-07 17:50 
AnswerRe: adding a property in the class Pin
Steve Echols13-Sep-07 18:39
Steve Echols13-Sep-07 18:39 
QuestionSqlTransaction between postbacks Pin
tonymathewt13-Sep-07 17:35
professionaltonymathewt13-Sep-07 17:35 
AnswerRe: SqlTransaction between postbacks Pin
Steve Echols13-Sep-07 18:52
Steve Echols13-Sep-07 18:52 
GeneralRe: SqlTransaction between postbacks Pin
tonymathewt13-Sep-07 21:03
professionaltonymathewt13-Sep-07 21:03 
QuestionSearch Button Pin
Amit Kumar G13-Sep-07 13:51
Amit Kumar G13-Sep-07 13:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.