473,385 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to validate web Controls in atlas

Hi,

I am new to atlas, I would like to add validations to webControls.
Here is the following code is working fine without masterpage.

Withe master Page i am getting error.

--code

<%@ Page MasterPageFile="~/MasterPage.master" Language="C#"
AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<atlas:ScriptManager ID="ScriptManager1" runat="server" />
<div>
<asp:TextBox ID="TextBox1" runat="server" />
<span id="validator1" style="color: red">Please Enter
FirstName</span>
<asp:TextBox ID="TextBox2" runat="server" />
<span id="validator2" style="color: red">Please Enter
LastName</span>
<asp:Button ID="BtnSubmit" runat="server" Text="Submit" />
</div>
<div id="formGroup"></div>

<script type="text/xml-script">
<page xmlns:script="http://schemas.microsoft.com/xml-script/2005">
<references>
<add src="ScriptLibrary/AtlasUI.js" />
<add src="ScriptLibrary/AtlasControls.js" />
</references>
<components>
<textBox targetElement="TextBox1">
<validators>
<requiredFieldValidator errorMessage="You must enter some
text." />
</validators>
</textBox>
<validationErrorLabel targetElement="validator1"
associatedControl="TextBox1" />

<textBox targetElement="TextBox2">
<validators>
<requiredFieldValidator errorMessage="You must enter
some text." />
</validators>
</textBox>
<validationErrorLabel targetElement="validator2"
associatedControl="TextBox2" />

<validationGroup id="formGroup" targetElement="formGroup">
<associatedControls>
<reference component="TextBox1" />
<reference component="TextBox2" />
</associatedControls>
</validationGroup>

<button targetElement="BtnSubmit" >
<bindings>
<binding dataContext="formGroup" dataPath="isValid"
property="enabled" />
</bindings>
</button>
</components>
</page>
</script>
</asp:Content>

--end code

I know the reason why I am gettting error.

Page controls are rendered at server end, and has different client IDs for
controls.

Control Id's are not matching with xmlScript targetElement Names and
component names.

How do i generate the xml-script from the server end.

Is there any way to work with server controls.


Feb 24 '06 #1
0 782

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Sharon | last post by:
Hi all, I was wondering if anyone had experience using ajax with asp.net controls. What i'm looking for, are ways to implement and possible problems. A way to implement could be rendering the...
1
by: Lamentations | last post by:
im still coming to grips with server controls and now all the new stuff with 2.0, i have more questions. how does frameworks like atlas relate to the varying degrees you could use server controls...
1
by: nigeaman | last post by:
Hi, There seems to be a problem with the validator controls and Atlas June CTP. The update panel is posting back to the server even if a control fails validation. Any ideas ? Thanks in...
1
by: vbnetguy | last post by:
After adding a couple of atlas controls to my page the validators do not seem to work. The first click fires the validator controls correctly, however on the second click - without touching a...
0
by: veerleverbr | last post by:
Hi, I want to create an asp.net page with a tabpage. On the tabpage I want to use the WebDateChooser and WebDataInput controls of Infragistics. These 2 controls use a mask to enter a date and...
5
by: igotyourdotnet | last post by:
I have a question on atlas: I can create an 'atlas project' and I can add atlas controls fine. but when I try and add an atlas control to an existing asp.net web app I can't, Why? I did notice...
0
by: jobs | last post by:
Pardon the confusion.. Atlas is now Ajax Extensions? Anyways, I;m going through the install process, having installed 1.0 beta, CTP, and the control toolkit. Everything appears to have gone...
4
by: Rob Meade | last post by:
Hi all, I played with my first bit of AJAX the other week and was pleasantly surprised that I achieved my goal..now I'd like to try something else.. Question... If I have an updatePanel,...
5
by: =?Utf-8?B?Q2FybG8gRm9saW5p?= | last post by:
Hi, I'm starting studying ATLAS. First thing that I'm concerned about is if the ATLAS controls are a pluggable options for server side controls.. What I wonder is if the case ATLAS extension are...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.