Click here to Skip to main content
16,013,207 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: ImageButton in datagrid Pin
_AK_1-Aug-06 1:04
_AK_1-Aug-06 1:04 
GeneralRe: ImageButton in datagrid [modified] Pin
ewhizz1-Aug-06 2:23
ewhizz1-Aug-06 2:23 
GeneralRe: ImageButton in datagrid Pin
_AK_1-Aug-06 2:34
_AK_1-Aug-06 2:34 
GeneralRe: ImageButton in datagrid Pin
ewhizz1-Aug-06 2:41
ewhizz1-Aug-06 2:41 
GeneralRe: ImageButton in datagrid Pin
_AK_1-Aug-06 2:44
_AK_1-Aug-06 2:44 
QuestionAdding cascading dropdown in ASP.NET 2.0 custom control Pin
seee sharp1-Aug-06 0:21
seee sharp1-Aug-06 0:21 
QuestionCustomValidator textbox nad dropdownlist Pin
StonePit1-Aug-06 0:02
StonePit1-Aug-06 0:02 
AnswerRe: CustomValidator textbox nad dropdownlist Pin
Tim Kohler1-Aug-06 3:13
Tim Kohler1-Aug-06 3:13 
just add the custom validator to your page and set its ClientValidationFunction function to the name of a javascript function that will do the validation. You don't have to set its 'controltovalidate' property as you will be interogating 2 controls.


Put a section in the header of your page that defines the function you just referenced. In this function, use the DHTML DOM to grab the elements you are interested in and interogate them.


your javascript function would look something like:

function CustomClientValidate(source, arguments)
{

ddl_Items = document.getElementById('ddl_Items'); //note the string in getElem.. must match the clientid of your asp.net dropdown.

or

txt_myentryfield = document.getElementById('txt_myentryfield');

and then something like


arguments.IsValid=true

var itemSelected = false;

for (n = 0; !itemSelected && n < ddl_Items.items.count; n++)
if (ddl_Items.items[n].selected)
itemSelected = true;

if (txt_myentryfield.value == '' && !itemSelected)
arguments.IsValid=false;


}



I did not try to run any of this and I may not be remembering how to iterate the items in the drop down on the client (a select on the client), but you can look that up elsewhere. This is the generate idea.
Questionusing webchart in asp.net Pin
Swaroop Roy31-Jul-06 23:39
Swaroop Roy31-Jul-06 23:39 
QuestionThanks Guffa for your Regular Expression, still i need your help [modified] Pin
Exelioindia31-Jul-06 23:14
Exelioindia31-Jul-06 23:14 
GeneralRe: Thanks Guffa for your Regular Expression, still i need your help Pin
Guffa1-Aug-06 0:32
Guffa1-Aug-06 0:32 
QuestionBind Datalist Control in another datalist control Pin
deepaks331-Jul-06 22:58
deepaks331-Jul-06 22:58 
AnswerRe: Bind Datalist Control in another datalist control Pin
_AK_31-Jul-06 23:06
_AK_31-Jul-06 23:06 
GeneralRe: Bind Datalist Control in another datalist control Pin
deepaks331-Jul-06 23:15
deepaks331-Jul-06 23:15 
GeneralRe: Bind Datalist Control in another datalist control Pin
_AK_31-Jul-06 23:19
_AK_31-Jul-06 23:19 
GeneralRe: Bind Datalist Control in another datalist control Pin
deepaks331-Jul-06 23:22
deepaks331-Jul-06 23:22 
GeneralRe: Bind Datalist Control in another datalist control Pin
_AK_31-Jul-06 23:24
_AK_31-Jul-06 23:24 
Questionchecking the string Pin
Mairy31-Jul-06 22:18
Mairy31-Jul-06 22:18 
AnswerRe: checking the string Pin
MHASSANF31-Jul-06 22:31
MHASSANF31-Jul-06 22:31 
AnswerRe: checking the string Pin
Exelioindia31-Jul-06 22:59
Exelioindia31-Jul-06 22:59 
AnswerRe: checking the string Pin
Vipin Venugopal31-Jul-06 22:59
Vipin Venugopal31-Jul-06 22:59 
GeneralRe: checking the string Pin
J4amieC1-Aug-06 0:07
J4amieC1-Aug-06 0:07 
QuestionPopulating ShoppingCart Pin
Jay_se31-Jul-06 21:46
Jay_se31-Jul-06 21:46 
QuestionString constants must end with a double quote Pin
kirthikirthi31-Jul-06 20:19
kirthikirthi31-Jul-06 20:19 
AnswerRe: String constants must end with a double quote Pin
_AK_31-Jul-06 21:05
_AK_31-Jul-06 21:05 

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.