Click here to Skip to main content
15,890,527 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Generating site "posts" Pin
teejayem18-May-09 12:41
teejayem18-May-09 12:41 
AnswerRe: Generating site "posts" Pin
PauloCastilho18-May-09 12:52
PauloCastilho18-May-09 12:52 
GeneralRe: Generating site "posts" Pin
teejayem18-May-09 13:22
teejayem18-May-09 13:22 
QuestionWrite to CSV in C# asp.net Pin
Civic0618-May-09 7:50
Civic0618-May-09 7:50 
AnswerRe: Write to CSV in C# asp.net Pin
ToddHileHoffer18-May-09 8:16
ToddHileHoffer18-May-09 8:16 
GeneralRe: Write to CSV in C# asp.net Pin
Civic0619-May-09 4:21
Civic0619-May-09 4:21 
GeneralRe: Write to CSV in C# asp.net Pin
ToddHileHoffer19-May-09 4:37
ToddHileHoffer19-May-09 4:37 
QuestionWhy does button’s click subroutine not execute when RequiredFieldValidator is false? Pin
bigmish218-May-09 4:18
bigmish218-May-09 4:18 
I’ve got a simple page that should display the string “OK” when the user clicks the button. It works fine untill I put a RequiredFieldValidator on the page. Now it seems like there is an implicit conditional in the source code that prevents the “OK” from being displayed unless the text box has text in it. I put no such conditional in the code; why is it behaving like this?

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="pageIsValidTest.aspx.vb" Inherits="pageIsValidTest" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
         Textbox:
        <asp:TextBox ID="TextBox" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox"
            ErrorMessage="enter text"></asp:RequiredFieldValidator><br />
        <asp:Button ID="Button1" runat="server" Text="Button" /><br />
        Label:
        <asp:Label ID="Label" runat="server"></asp:Label></div>
    </form>
</body>
</html>

Partial Class pageIsValidTest
    Inherits System.Web.UI.Page

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Label.Text = "OK"
    End Sub
End Class

AnswerRe: Why does button’s click subroutine not execute when RequiredFieldValidator is false? Pin
Ian McCaul18-May-09 4:47
Ian McCaul18-May-09 4:47 
GeneralRe: Why does button’s click subroutine not execute when RequiredFieldValidator is false? Pin
bigmish218-May-09 5:04
bigmish218-May-09 5:04 
GeneralRe: Why does button’s click subroutine not execute when RequiredFieldValidator is false? Pin
El_Programmer18-May-09 5:25
El_Programmer18-May-09 5:25 
GeneralRe: Why does button’s click subroutine not execute when RequiredFieldValidator is false? Pin
bigmish218-May-09 6:06
bigmish218-May-09 6:06 
GeneralRe: Why does button’s click subroutine not execute when RequiredFieldValidator is false? Pin
El_Programmer18-May-09 6:31
El_Programmer18-May-09 6:31 
GeneralRe: Why does button’s click subroutine not execute when RequiredFieldValidator is false? Pin
N a v a n e e t h18-May-09 6:37
N a v a n e e t h18-May-09 6:37 
GeneralRe: Why does button’s click subroutine not execute when RequiredFieldValidator is false? Pin
bigmish218-May-09 7:21
bigmish218-May-09 7:21 
QuestionSession Size Pin
mehrdadc4818-May-09 4:11
mehrdadc4818-May-09 4:11 
AnswerRe: Session Size Pin
N a v a n e e t h18-May-09 6:13
N a v a n e e t h18-May-09 6:13 
AnswerRe: Session Size Pin
Yusuf18-May-09 6:46
Yusuf18-May-09 6:46 
AnswerRe: Session Size Pin
Manas Bhardwaj18-May-09 9:08
professionalManas Bhardwaj18-May-09 9:08 
QuestionSet Tablndex To a UserControl which is present inside ModalpopupExtender Pin
Pawan Kiran18-May-09 3:38
Pawan Kiran18-May-09 3:38 
AnswerRe: Set Tablndex To a UserControl which is present inside ModalpopupExtender Pin
Herman<T>.Instance18-May-09 4:18
Herman<T>.Instance18-May-09 4:18 
GeneralRe: Set Tablndex To a UserControl which is present inside ModalpopupExtender Pin
Pawan Kiran19-May-09 3:53
Pawan Kiran19-May-09 3:53 
GeneralRe: Set Tablndex To a UserControl which is present inside ModalpopupExtender Pin
Herman<T>.Instance19-May-09 4:09
Herman<T>.Instance19-May-09 4:09 
GeneralRe: Set Tablndex To a UserControl which is present inside ModalpopupExtender Pin
Pawan Kiran19-May-09 22:54
Pawan Kiran19-May-09 22:54 
GeneralRe: Set Tablndex To a UserControl which is present inside ModalpopupExtender Pin
Herman<T>.Instance19-May-09 23:19
Herman<T>.Instance19-May-09 23:19 

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.