Click here to Skip to main content
15,898,222 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Trying to export from ASP.NET to Powerpoint 2007 Pin
Adam R Harris25-Jun-10 11:11
Adam R Harris25-Jun-10 11:11 
GeneralRe: Trying to export from ASP.NET to Powerpoint 2007 Pin
watchdogger29-Jun-10 10:08
watchdogger29-Jun-10 10:08 
GeneralRe: Trying to export from ASP.NET to Powerpoint 2007 Pin
Adam R Harris29-Jun-10 13:40
Adam R Harris29-Jun-10 13:40 
QuestionSearch Control in GridView in asp.net Pin
anish27patel25-Jun-10 4:30
anish27patel25-Jun-10 4:30 
AnswerRe: Search Control in GridView in asp.net Pin
PunkIsNotDead25-Jun-10 12:20
PunkIsNotDead25-Jun-10 12:20 
QuestionFront end & Back end Pin
Gjm25-Jun-10 3:36
Gjm25-Jun-10 3:36 
AnswerRe: Front end & Back end Pin
JamieRushton_25-Jun-10 3:43
JamieRushton_25-Jun-10 3:43 
QuestionSet label's text clientside and use it to set button's text server side. Pin
Hardus Lombaard25-Jun-10 3:34
Hardus Lombaard25-Jun-10 3:34 
When I click Button1, Button2 gets enabled and the label's text is set to "bye". This is done with a bit of javascript. When Button2 is clicked, it's text should be set to "bye" - the new text value of the label, but is set to "hello" instead - the original text value of the label. How can I fix this?

Aspx:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">  
    <title>Test</title>  
    <script type="text/javascript">
        function Hello() {
            document.getElementById('Button2').disabled = false;
            document.getElementById('Label1').innerText = "bye";
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>        
        <input id="Button1" type="button" value="Button1" onclick="Hello()" />
        <br />
        <asp:Button ID="Button2" runat="server" Enabled="False" Text="Button2" 
            onclick="Button2_Click" />
        <br />
        <asp:Label runat="server" ID="Label1" Text="hello"></asp:Label>
    </div>
    </form>
</body>
</html>


Cs:
protected void Button2_Click(object sender, EventArgs e)
{
    this.Button2.Text = this.Label1.Text;
}

AnswerRe: Set label's text clientside and use it to set button's text server side. Pin
JamieRushton_25-Jun-10 3:52
JamieRushton_25-Jun-10 3:52 
GeneralRe: Set label's text clientside and use it to set button's text server side. Pin
Hardus Lombaard25-Jun-10 4:11
Hardus Lombaard25-Jun-10 4:11 
GeneralRe: Set label's text clientside and use it to set button's text server side. Pin
JamieRushton_25-Jun-10 4:19
JamieRushton_25-Jun-10 4:19 
GeneralRe: Set label's text clientside and use it to set button's text server side. Pin
Hardus Lombaard25-Jun-10 4:30
Hardus Lombaard25-Jun-10 4:30 
GeneralRe: Set label's text clientside and use it to set button's text server side. Pin
JamieRushton_25-Jun-10 4:39
JamieRushton_25-Jun-10 4:39 
GeneralRe: Set label's text clientside and use it to set button's text server side. Pin
Hardus Lombaard25-Jun-10 4:54
Hardus Lombaard25-Jun-10 4:54 
QuestionEnable button and change label's text clientside Pin
Hardus Lombaard25-Jun-10 2:10
Hardus Lombaard25-Jun-10 2:10 
AnswerRe: Enable button and change label's text clientside Pin
Not Active25-Jun-10 2:18
mentorNot Active25-Jun-10 2:18 
AnswerRe: Enable button and change label's text clientside Pin
Ankur\m/25-Jun-10 3:01
professionalAnkur\m/25-Jun-10 3:01 
GeneralRe: Enable button and change label's text clientside Pin
michaelschmitt25-Jun-10 4:10
michaelschmitt25-Jun-10 4:10 
GeneralRe: Enable button and change label's text clientside Pin
Hardus Lombaard25-Jun-10 4:21
Hardus Lombaard25-Jun-10 4:21 
GeneralRe: Enable button and change label's text clientside Pin
T M Gray25-Jun-10 9:29
T M Gray25-Jun-10 9:29 
GeneralRe: Enable button and change label's text clientside Pin
raju melveetilpurayil26-Jun-10 0:08
professionalraju melveetilpurayil26-Jun-10 0:08 
GeneralRe: Enable button and change label's text clientside Pin
Ankur\m/25-Jun-10 18:20
professionalAnkur\m/25-Jun-10 18:20 
Questionend session on closing the browser [modified] Pin
Hemant Thaker25-Jun-10 1:01
Hemant Thaker25-Jun-10 1:01 
AnswerRe: end session on closing the browser Pin
R. Giskard Reventlov25-Jun-10 2:31
R. Giskard Reventlov25-Jun-10 2:31 
QuestionConvert generic list into datatable Pin
zeego24-Jun-10 20:11
zeego24-Jun-10 20:11 

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.