but iwant a javacript validation . when i will submit button it will show an alert box
The condion is like that:-
if dropdowlist value is P
alert('textbox should not blank')
if dropdowlist value is L
then alert will not show.
i want in javascript. how i will do plz give me solution

Sanjay KumarRank #561 · 4.3K reputationPosted Sep 15, 2013, 10:24 PM EDT
http://www.codeproject.com/Tips/404274/Client-Side-Validation-using-JavaScript
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Sep 15, 2013, 10:28 PM EDT
try this:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
ranjan sahooRank #5,709 · 289 reputationPosted Sep 15, 2013, 10:46 PM EDT
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Sep 15, 2013, 10:56 PM EDT
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
ranjan sahooRank #5,709 · 289 reputationPosted Sep 15, 2013, 10:57 PM EDT
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Sep 15, 2013, 11:00 PM EDT
its working for me perfectly. plz share your code i will check that.
ranjan sahooRank #5,709 · 289 reputationPosted Sep 15, 2013, 11:06 PM EDT
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Sep 15, 2013, 11:10 PM EDT
you can try like this to call a javascript function from .cs or code behind
Page.ClientScript.RegisterStartupScript(this.GetType(),"Call my function","MyFunction()",true);
MyFunction() is the javascript function
ranjan sahooRank #5,709 · 289 reputationPosted Sep 15, 2013, 11:34 PM EDT
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Sep 15, 2013, 11:41 PM EDT