Click here to Skip to main content
15,895,740 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: How to improve website ranking in Google Pin
Maor David27-May-07 10:38
Maor David27-May-07 10:38 
GeneralRe: How to improve website ranking in Google Pin
N a v a n e e t h27-May-07 21:16
N a v a n e e t h27-May-07 21:16 
AnswerRe: How to improve website ranking in Google Pin
N a v a n e e t h27-May-07 21:23
N a v a n e e t h27-May-07 21:23 
GeneralRe: How to improve website ranking in Google Pin
rajesh22528-May-07 3:26
rajesh22528-May-07 3:26 
QuestionHow do I pass a string from one aspx file to another? Pin
Ranger4927-May-07 3:55
Ranger4927-May-07 3:55 
AnswerRe: How do I pass a string from one aspx file to another? Pin
Dave Herren27-May-07 5:18
Dave Herren27-May-07 5:18 
GeneralRe: How do I pass a string from one aspx file to another? Pin
Ranger4927-May-07 7:45
Ranger4927-May-07 7:45 
GeneralRe: How do I pass a string from one aspx file to another? Pin
Ranger4927-May-07 8:38
Ranger4927-May-07 8:38 
All I am trying to do is pass a string from Default.aspx to Default2.aspx,
and it just doesn't seem to work!!!
Ranger.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In Default.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" ClassName="_Default" %>

public partial class _Default : System.Web.UI.Page
{
public string message
{
get
{
return BronLabel.Text;
}
}

protected void Page_Load(object sender, EventArgs e)
{

}
protected void Button_Click(object sender, EventArgs e)
{
Server.Transfer("Default2.aspx");
}

In Default2.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<%@ Reference Page="~/Default.aspx" %>

public partial class Default2 : System.Web.UI.Page
{
_Default sourceClass;

protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
sourceClass = (_Default)Context.Handler; Confused | :confused: <<< exception cannot cast

DoelLabel.Text = sourceClass.message;
}
}
}

Novice
GeneralRe: How do I pass a string from one aspx file to another? Pin
Dave Herren27-May-07 10:07
Dave Herren27-May-07 10:07 
GeneralRe: How do I pass a string from one aspx file to another? Pin
Ranger4927-May-07 10:19
Ranger4927-May-07 10:19 
GeneralRe: How do I pass a string from one aspx file to another? Pin
Ranger4927-May-07 10:31
Ranger4927-May-07 10:31 
Questioncouldnt fined "/scripts/myASP.asp" !!! Pin
sanaziuse27-May-07 2:39
sanaziuse27-May-07 2:39 
AnswerRe: couldnt fined "/scripts/myASP.asp" !!! Pin
Dave Herren27-May-07 5:07
Dave Herren27-May-07 5:07 
QuestionHyperlink help Pin
eric_tran26-May-07 23:15
eric_tran26-May-07 23:15 
AnswerRe: Hyperlink help Pin
enjoycrack27-May-07 0:47
enjoycrack27-May-07 0:47 
GeneralRe: Hyperlink help Pin
eric_tran27-May-07 3:19
eric_tran27-May-07 3:19 
GeneralRe: Hyperlink help Pin
enjoycrack27-May-07 5:54
enjoycrack27-May-07 5:54 
GeneralRe: Hyperlink help Pin
eric_tran28-May-07 2:01
eric_tran28-May-07 2:01 
Questionuploading images Pin
NinaWilliam26-May-07 21:04
NinaWilliam26-May-07 21:04 
AnswerRe: uploading images Pin
enjoycrack27-May-07 0:35
enjoycrack27-May-07 0:35 
GeneralRe: uploading images Pin
NinaWilliam20-Jun-07 19:47
NinaWilliam20-Jun-07 19:47 
Questionhow to use gridview,dropdown,datatable in c#,asp.net Pin
tauras8126-May-07 18:16
tauras8126-May-07 18:16 
Questionregarding database Pin
s_a_20026326-May-07 12:48
s_a_20026326-May-07 12:48 
AnswerRe: regarding database Pin
Not Active26-May-07 13:51
mentorNot Active26-May-07 13:51 
GeneralRe: regarding database Pin
s_a_20026326-May-07 14:08
s_a_20026326-May-07 14:08 

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.