Click here to Skip to main content
15,899,313 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Regarding Page performanance Pin
Brij8-Dec-08 18:22
mentorBrij8-Dec-08 18:22 
QuestionUpdating outlook calander from asp.net on click(Urgent) Pin
nainakarri8-Dec-08 6:28
nainakarri8-Dec-08 6:28 
AnswerRe: Updating outlook calander from asp.net on click(Urgent) Pin
Christian Graus8-Dec-08 9:33
protectorChristian Graus8-Dec-08 9:33 
AnswerRe: Updating outlook calander from asp.net on click(Urgent) Pin
Sandeep Mewara4-Jan-09 22:43
mveSandeep Mewara4-Jan-09 22:43 
QuestionHow to handle file upload exception Pin
Aslesh8-Dec-08 6:28
Aslesh8-Dec-08 6:28 
AnswerRe: How to handle file upload exception Pin
Adam Maras8-Dec-08 7:23
Adam Maras8-Dec-08 7:23 
GeneralRe: How to handle file upload exception Pin
Aslesh8-Dec-08 9:39
Aslesh8-Dec-08 9:39 
QuestionHow to get the TemplateItem of a DetailsView Pin
b43r_3oo38-Dec-08 5:24
b43r_3oo38-Dec-08 5:24 
Hi all,

I have a DetailsView and GridView on one site. The DetailsView contains some TemplateItems with different validators like RequiredFieldValidator or RegularExpressionValidator.

Example:
<asp:detailsview id="DetailsViewInsertUser" runat="server" autogeneraterows="False" xmlns:asp="#unknown">
                            DataKeyNames="Id" DataSourceID="myDSObj" DefaultMode="Insert"
                            Caption="Add user" CaptionAlign="Left">
                            <Fields>
                                <asp:templatefield headertext="Titel" sortexpression="Titel">
                                    <EditItemTemplate>
                                        <asp:textbox id="TitelTextBox" runat="server" text="<%# Bind("Titel") %>"></asp:textbox>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:textbox id="TitelTextBox" runat="server" text="<%# Bind("Titel") %>"></asp:textbox>
                                        <asp:requiredfieldvalidator id="TitelTextBoxRequiredFieldValidator" runat="server">
                                            ControlToValidate="TitelTextBox" ErrorMessage="Error!"
                                            Display="Dynamic">
                                        </asp:RequiredFieldValidator>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:label id="Label1" runat="server" text="<%# Bind("Titel") %>"></asp:label>
                                    </ItemTemplate>
                                </asp:TemplateField>
...
</asp:requiredfieldvalidator></asp:templatefield></asp:detailsview>



When I want to edit entries of the GridView and confirm those with an Update HTML Button in the view, the event won't be completed cause the validators block them. So far it's all right.

Now I tried to disable those validation controls via the Enable Attribute of them, but I don't know how iI can access this control via my DetailsViewInsertUser object.

Example:
protected void UserGridView_OnRowEditing(object sender, EventArgs e)
    {        ((RegularExpressionValidator)UserGridView.Controls.FindControl("EMailTextBoxRegexValidator")).Enabled = false;    }


Does somebody know how it works?

Cheers
Jerry
AnswerRe: How to get the TemplateItem of a DetailsView Pin
b43r_3oo38-Dec-08 7:22
b43r_3oo38-Dec-08 7:22 
QuestionGridview not showing Empty data Template when Empty Pin
www.Developerof.NET8-Dec-08 3:22
www.Developerof.NET8-Dec-08 3:22 
AnswerRe: Gridview not showing Empty data Template when Empty Pin
Abhijit Jana8-Dec-08 3:25
professionalAbhijit Jana8-Dec-08 3:25 
GeneralRe: Gridview not showing Empty data Template when Empty Pin
www.Developerof.NET8-Dec-08 4:16
www.Developerof.NET8-Dec-08 4:16 
QuestionFile.Exists - cannot find file on PostBack Pin
Member 34028868-Dec-08 1:58
Member 34028868-Dec-08 1:58 
AnswerRe: File.Exists - cannot find file on PostBack Pin
Brij8-Dec-08 2:40
mentorBrij8-Dec-08 2:40 
QuestionAccessing 3rd party software object from asp.net Pin
lavankumar8-Dec-08 1:57
lavankumar8-Dec-08 1:57 
AnswerRe: Accessing 3rd party software object from asp.net Pin
Abhijit Jana8-Dec-08 2:22
professionalAbhijit Jana8-Dec-08 2:22 
GeneralRe: Accessing 3rd party software object from asp.net Pin
Brij8-Dec-08 2:48
mentorBrij8-Dec-08 2:48 
AnswerRe: Accessing 3rd party software object from asp.net Pin
Christian Graus8-Dec-08 9:44
protectorChristian Graus8-Dec-08 9:44 
QuestionHow to dynamically load an ASPX page into a exisitng element from code behind?? Pin
DuelMonster_Coder8-Dec-08 0:57
professionalDuelMonster_Coder8-Dec-08 0:57 
AnswerRe: How to dynamically load an ASPX page into a exisitng element from code behind?? Pin
Brij8-Dec-08 1:14
mentorBrij8-Dec-08 1:14 
GeneralRe: How to dynamically load an ASPX page into a exisitng element from code behind?? Pin
DuelMonster_Coder8-Dec-08 1:47
professionalDuelMonster_Coder8-Dec-08 1:47 
GeneralRe: How to dynamically load an ASPX page into a exisitng element from code behind?? Pin
Abhijit Jana8-Dec-08 1:50
professionalAbhijit Jana8-Dec-08 1:50 
GeneralRe: How to dynamically load an ASPX page into a exisitng element from code behind?? Pin
DuelMonster_Coder8-Dec-08 2:50
professionalDuelMonster_Coder8-Dec-08 2:50 
AnswerRe: How to dynamically load an ASPX page into a exisitng element from code behind?? Pin
Satish - Developer8-Dec-08 1:40
Satish - Developer8-Dec-08 1:40 
AnswerRe: How to dynamically load an ASPX page into a exisitng element from code behind?? Pin
Paddy Boyd8-Dec-08 2:28
Paddy Boyd8-Dec-08 2:28 

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.