Click here to Skip to main content
15,925,661 members
Home / Discussions / C#
   

C#

 
AnswerRe: print concept very urgent help me Pin
Christian Graus27-Jun-08 19:46
protectorChristian Graus27-Jun-08 19:46 
GeneralRe: print concept very urgent help me Pin
cse.vidhya27-Jun-08 21:02
cse.vidhya27-Jun-08 21:02 
GeneralRe: print concept very urgent help me Pin
Christian Graus27-Jun-08 21:06
protectorChristian Graus27-Jun-08 21:06 
Questionasp.net 3.5 Pin
arkiboys27-Jun-08 18:37
arkiboys27-Jun-08 18:37 
AnswerRe: asp.net 3.5 Pin
Abhijit Jana27-Jun-08 21:23
professionalAbhijit Jana27-Jun-08 21:23 
AnswerRe: asp.net 3.5 Pin
wasimsharp27-Jun-08 23:14
wasimsharp27-Jun-08 23:14 
QuestionRegular Expressions - State Machine UML Diagram? Pin
Leblanc Meneses27-Jun-08 16:53
Leblanc Meneses27-Jun-08 16:53 
AnswerRe: Regular Expressions - State Machine UML Diagram? Pin
Christian Graus27-Jun-08 17:32
protectorChristian Graus27-Jun-08 17:32 
QuestionDataRow question Pin
David Loring27-Jun-08 16:24
David Loring27-Jun-08 16:24 
AnswerRe: DataRow question Pin
Karthik Kalyanasundaram27-Jun-08 16:30
Karthik Kalyanasundaram27-Jun-08 16:30 
GeneralRe: DataRow question Pin
David Loring27-Jun-08 16:33
David Loring27-Jun-08 16:33 
QuestionWhat is it called when your class has a root collection and how do you do it in C#? Pin
qmuffs27-Jun-08 16:15
qmuffs27-Jun-08 16:15 
AnswerRe: What is it called when your class has a root collection and how do you do it in C#? Pin
Paul Conrad27-Jun-08 16:22
professionalPaul Conrad27-Jun-08 16:22 
GeneralRe: What is it called when your class has a root collection and how do you do it in C#? Pin
qmuffs27-Jun-08 16:30
qmuffs27-Jun-08 16:30 
AnswerRe: What is it called when your class has a root collection and how do you do it in C#? Pin
Karthik Kalyanasundaram27-Jun-08 16:37
Karthik Kalyanasundaram27-Jun-08 16:37 
GeneralRe: What is it called when your class has a root collection and how do you do it in C#? Pin
qmuffs27-Jun-08 16:41
qmuffs27-Jun-08 16:41 
QuestionADO.net locks out SQL2000 user account under load Pin
Mr Jen Withers27-Jun-08 11:11
Mr Jen Withers27-Jun-08 11:11 
AnswerRe: ADO.net locks out SQL2000 user account under load Pin
Mark Churchill28-Jun-08 6:04
Mark Churchill28-Jun-08 6:04 
GeneralRe: ADO.net locks out SQL2000 user account under load Pin
Mr Jen Withers28-Jun-08 6:36
Mr Jen Withers28-Jun-08 6:36 
QuestionProblems withValidation Application Block and config files Pin
novicedotnetter27-Jun-08 10:10
novicedotnetter27-Jun-08 10:10 
Hi,
I am new to C#, tried working with Validation Application blocks using the .config file approach and have run into some issues.I have created a solution file with 2 projects, 1 project has a form and am passing a value to the other project ( basically a class library )which has the app.config file and the class which contains the properties for which i have the get and set values.
Project 1

using ClassLibrary1;
using Microsoft.Practices.EnterpriseLibrary.Validation;
using Microsoft.Practices.EnterpriseLibrary.Validation.Validators;

namespace Trial
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{

Class1 cw = new Class1();
cw.iNum = 1110;

ValidationResults results = Validation.ValidateFromConfiguration(cw, "Default");
if (!results.IsValid)
MessageBox.Show("error");

}
}
}


Project 2 has Class1.cs and the config file
Class1.cs
public class Class1
{
public int iNum;
public Class1()
{
}
#region Properties
public int Num
{
get { return iNum; }
set { iNum = value; }
}
#endregion
}


app.config
<configuration>
<configsections>
<section name="validation" type="Microsoft.Practices.EnterpriseLibrary.Validation.Configuration.ValidationSettings, Microsoft.Practices.EnterpriseLibrary.Validation, Version=4.0.0.0, Culture=neutral" />
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=4.0.0.0, Culture=neutral" />
</configsections>
<validation>
<type assemblyname="ClassLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
name="ClassLibrary1.Class1"&gt;
<ruleset name="Default">
<properties>
<property name="Num">
<validator lowerbound="2" lowerboundtype="Inclusive" upperbound="100">
upperBoundType="Inclusive" negated="false" messageTemplate=""
messageTemplateResourceName="" messageTemplateResourceType=""
tag="" type="Microsoft.Practices.EnterpriseLibrary.Validation.Validators.RangeValidator, Microsoft.Practices.EnterpriseLibrary.Validation, Version=4.0.0.0, Culture=neutral"
name="Range Validator" /&gt;
</validator></property>
</properties>
</ruleset>
</type>
</validation>
</configuration>

my problem is that i am passing a value of 1110, but the range value is from 2 till 100, yet the validation is succeeding. Am i missing out on any details
QuestionSlow selection in ListView Pin
Xmen Real 27-Jun-08 8:06
professional Xmen Real 27-Jun-08 8:06 
AnswerRe: Slow selection in ListView Pin
J$27-Jun-08 10:04
J$27-Jun-08 10:04 
GeneralRe: Slow selection in ListView Pin
Xmen Real 27-Jun-08 12:36
professional Xmen Real 27-Jun-08 12:36 
GeneralRe: Slow selection in ListView Pin
Leblanc Meneses27-Jun-08 15:17
Leblanc Meneses27-Jun-08 15:17 
GeneralRe: Slow selection in ListView Pin
Xmen Real 27-Jun-08 15:28
professional Xmen Real 27-Jun-08 15: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.