Click here to Skip to main content
15,905,144 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionRe: Manage role is this correct? [modified] Pin
amina8912-Jul-10 5:14
amina8912-Jul-10 5:14 
AnswerRe: Manage role is this correct? Pin
Not Active12-Jul-10 5:23
mentorNot Active12-Jul-10 5:23 
QuestionRe: Manage role is this correct? Pin
amina8912-Jul-10 5:56
amina8912-Jul-10 5:56 
QuestionMessage Removed Pin
12-Jul-10 2:06
Sr...Frank12-Jul-10 2:06 
AnswerRe: How to fix resolution in ASP.NET? Pin
Peace ON12-Jul-10 2:24
Peace ON12-Jul-10 2:24 
QuestionMessage Removed Pin
12-Jul-10 1:03
jintalPatel12-Jul-10 1:03 
AnswerRe: Javascript : Not Set the value at server side Pin
Peace ON12-Jul-10 1:24
Peace ON12-Jul-10 1:24 
QuestionISPostBack is TRUE when going to the page even at first time [modified] Pin
AnandDesai1912-Jul-10 0:54
AnandDesai1912-Jul-10 0:54 
Hi coders,

Currently I have encountered a very strange issue in my code. The summary is as follows:


Page1.aspx

<form id="frm" name="frm" action="Default.aspx" method="post">
.
.
.
.
</form>
<script language="javascript">
   window.document.frm.submit();	
</script>




Default.aspx

<form id="form1" runat="server">
    <div>
       <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    </div>
</form>



Default.aspx.cs

protected void Page_Load(object sender, EventArgs e)
{
    if (IsPostBack)
        TextBox1.Text = "Posted Back";
    else
        TextBox1.Text = "Normal senario";
}





While going to Default.aspx using upper method, TextBox1.Text is comming "Posted Back". That means IsPostBack property is set to TRUE even when going to the Default.aspx for the first time.


Can anyone please guide me why this happen?? and what should I do to get rid of this issue??
Thank You,

Anand Desai
modified on Monday, July 12, 2010 7:43 AM

AnswerRe: ISPostBack is TRUE when going to the page even at first time Pin
Peace ON12-Jul-10 0:57
Peace ON12-Jul-10 0:57 
GeneralRe: ISPostBack is TRUE when going to the page even at first time Pin
AnandDesai1912-Jul-10 1:02
AnandDesai1912-Jul-10 1:02 
GeneralRe: ISPostBack is TRUE when going to the page even at first time Pin
Not Active12-Jul-10 1:25
mentorNot Active12-Jul-10 1:25 
GeneralRe: ISPostBack is TRUE when going to the page even at first time Pin
AnandDesai1912-Jul-10 1:42
AnandDesai1912-Jul-10 1:42 
GeneralRe: ISPostBack is TRUE when going to the page even at first time Pin
NeverHeardOfMe12-Jul-10 1:43
NeverHeardOfMe12-Jul-10 1:43 
GeneralRe: ISPostBack is TRUE when going to the page even at first time Pin
AnandDesai1912-Jul-10 1:47
AnandDesai1912-Jul-10 1:47 
GeneralRe: ISPostBack is TRUE when going to the page even at first time Pin
Not Active12-Jul-10 2:26
mentorNot Active12-Jul-10 2:26 
GeneralRe: ISPostBack is TRUE when going to the page even at first time Pin
NeverHeardOfMe12-Jul-10 2:34
NeverHeardOfMe12-Jul-10 2:34 
GeneralRe: ISPostBack is TRUE when going to the page even at first time Pin
AnandDesai1912-Jul-10 1:54
AnandDesai1912-Jul-10 1:54 
GeneralRe: ISPostBack is TRUE when going to the page even at first time Pin
Not Active12-Jul-10 2:31
mentorNot Active12-Jul-10 2:31 
GeneralRe: ISPostBack is TRUE when going to the page even at first time Pin
NeverHeardOfMe12-Jul-10 4:38
NeverHeardOfMe12-Jul-10 4:38 
GeneralRe: ISPostBack is TRUE when going to the page even at first time Pin
Not Active12-Jul-10 5:00
mentorNot Active12-Jul-10 5:00 
AnswerRe: ISPostBack is TRUE when going to the page even at first time Pin
SomeGuyThatIsMe12-Jul-10 4:14
SomeGuyThatIsMe12-Jul-10 4:14 
AnswerRe: ISPostBack is TRUE when going to the page even at first time Pin
T M Gray12-Jul-10 11:05
T M Gray12-Jul-10 11:05 
QuestionDoubts regarind user management Pin
cooljeba111-Jul-10 23:06
cooljeba111-Jul-10 23:06 
AnswerRe: Doubts regarind user management Pin
JHizzle11-Jul-10 23:34
JHizzle11-Jul-10 23:34 
GeneralRe: Doubts regarind user management Pin
cooljeba112-Jul-10 2:50
cooljeba112-Jul-10 2:50 

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.