Click here to Skip to main content
15,887,135 members
Home / Discussions / ASP.NET
   

ASP.NET

 
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 
QuestionIs there a way to capture all the page records in jqgrid when exporting to excel Pin
parkway13-Oct-14 9:15
parkway13-Oct-14 9:15 
AnswerRe: Is there a way to capture all the page records in jqgrid when exporting to excel Pin
devvvy13-Oct-14 9:32
devvvy13-Oct-14 9:32 
QuestionRegarding Self hosting SignalR Application in Win Service Pin
Tridip Bhattacharjee13-Oct-14 5:20
professionalTridip Bhattacharjee13-Oct-14 5:20 
QuestionHow to embed a video in my c# based dot net website which should be compatible in all browsers especially chrome. Pin
Member 1107698013-Oct-14 1:15
Member 1107698013-Oct-14 1:15 
Questionasp.net web service error "Microsoft.Web.Services3.Security.SecurityFault: Header http://schemas.xmlsoap.org/ws/2004/08/addressing:Action for ultimate recipient is required but not present in the message." Pin
rafay ansar12-Oct-14 10:32
rafay ansar12-Oct-14 10:32 
AnswerRe: asp.net web service error "Microsoft.Web.Services3.Security.SecurityFault: Header http://schemas.xmlsoap.org/ws/2004/08/addressing:Action for ultimate recipient is required but not present in the message." Pin
jkirkerx12-Oct-14 11:48
professionaljkirkerx12-Oct-14 11:48 
QuestionHow to use JScript to get mouse position inside image? Pin
Troublesome Tommy10-Oct-14 10:19
Troublesome Tommy10-Oct-14 10:19 
AnswerRe: How to use JScript to get mouse position inside image? Pin
Troublesome Tommy11-Oct-14 6:57
Troublesome Tommy11-Oct-14 6:57 

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.