Click here to Skip to main content
15,921,716 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Public Enum with strings Pin
byka17-Oct-14 10:27
byka17-Oct-14 10:27 
AnswerRe: Public Enum with strings Pin
ZurdoDev17-Oct-14 10:28
professionalZurdoDev17-Oct-14 10:28 
GeneralRe: Public Enum with strings Pin
RichardGrimmer30-Oct-14 5:10
RichardGrimmer30-Oct-14 5:10 
GeneralRe: Public Enum with strings Pin
ZurdoDev30-Oct-14 5:16
professionalZurdoDev30-Oct-14 5:16 
QuestionHow to develop Notifications feature Pin
JeevanJ15-Oct-14 23:19
JeevanJ15-Oct-14 23:19 
AnswerRe: How to develop Notifications feature Pin
ZurdoDev16-Oct-14 7:57
professionalZurdoDev16-Oct-14 7:57 
GeneralRe: How to develop Notifications feature Pin
JeevanJ16-Oct-14 19:20
JeevanJ16-Oct-14 19:20 
AnswerRe: How to develop Notifications feature Pin
ZurdoDev17-Oct-14 1:31
professionalZurdoDev17-Oct-14 1:31 
GeneralRe: How to develop Notifications feature Pin
JeevanJ17-Oct-14 8:13
JeevanJ17-Oct-14 8:13 
Questioncapture and save user id when new record created in asp.net mvc Pin
Member 1115681015-Oct-14 16:25
Member 1115681015-Oct-14 16:25 
AnswerRe: capture and save user id when new record created in asp.net mvc Pin
David Mujica16-Oct-14 3:14
David Mujica16-Oct-14 3:14 
GeneralRe: capture and save user id when new record created in asp.net mvc Pin
Member 1115681016-Oct-14 7:51
Member 1115681016-Oct-14 7:51 
GeneralRe: capture and save user id when new record created in asp.net mvc Pin
David Mujica17-Oct-14 8:36
David Mujica17-Oct-14 8:36 
GeneralRe: capture and save user id when new record created in asp.net mvc Pin
Member 1115681020-Oct-14 5:28
Member 1115681020-Oct-14 5:28 
Questionusing content page controls with external js file ? Pin
jayesh_n14-Oct-14 19:07
jayesh_n14-Oct-14 19:07 
AnswerRe: using content page controls with external js file ? Pin
jkirkerx15-Oct-14 11:08
professionaljkirkerx15-Oct-14 11:08 
Your question contradicts the title

Your should probably use jquery first

So you right click on solution exploer, add file JScript, and name it validate.js
Then create a function
function validate_text() {

var vFlag = true;
var txtFocus = 'rgb(255,255,255)';
var txtError = 'rgb(255,0,0)';

var message_value = $('[id*="_txt_CRM_VCM_MessageReply_Field"]').val();
    if (message_value.length < 2) {
        $('[id*="_txt_CRM_VCM_MessageReply_Field"]').css('border', 'solid 1px ' + txtError);
        vFlag = false;
    }
    else {
        $('[id*="_txt_CRM_VCM_MessageReply_Field"]').css('border', 'none');
    }
    return vFlag;
}


On your Button, program the OnClientClick property
<asp:TextBox ID="_txt_CRM_VCM_MessageReply_Field" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="return validate_text(); " />


Now drop in your jquery, this will dowmload jquery to the page for use in your validate.js
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>


or download jquery and create a jquery.js file where you placed your validate.js file

Make a reference to validate.js
Use the solution explorer and drag the file to within the head tags, and the script tag will automatically be formed.
QuestionEnableEventValidation="false" OR EnableEventValidation="true" Pin
Saeed Ansarinejad14-Oct-14 8:06
Saeed Ansarinejad14-Oct-14 8:06 
AnswerRe: EnableEventValidation="false" OR EnableEventValidation="true" Pin
Kornfeld Eliyahu Peter14-Oct-14 8:20
professionalKornfeld Eliyahu Peter14-Oct-14 8:20 
GeneralRe: EnableEventValidation="false" OR EnableEventValidation="true" Pin
Saeed Ansarinejad14-Oct-14 8:46
Saeed Ansarinejad14-Oct-14 8:46 
Questionpopup issue for showModalDialog Pin
Archana Gaikwad14-Oct-14 3:26
Archana Gaikwad14-Oct-14 3:26 
Suggestion[Repost] popup issue for showModalDialog Pin
Richard Deeming14-Oct-14 4:02
mveRichard Deeming14-Oct-14 4:02 
QuestionPassing GUID to a function Pin
Huma Ansari13-Oct-14 20:18
Huma Ansari13-Oct-14 20:18 
AnswerRe: Passing GUID to a function Pin
Mycroft Holmes13-Oct-14 20:44
professionalMycroft Holmes13-Oct-14 20:44 
AnswerRe: Passing GUID to a function Pin
Richard Deeming14-Oct-14 1:45
mveRichard Deeming14-Oct-14 1:45 
QuestionMy code is not working while using with updatepanel.The ddl selected item it coming blank whiule printing before using update panel it was coming. Pin
ank065713-Oct-14 19:35
ank065713-Oct-14 19:35 

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.