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

ASP.NET

 
GeneralRe: Printing in ASP.NET Pin
tunsten15-Dec-09 5:13
tunsten15-Dec-09 5:13 
GeneralRe: Printing in ASP.NET Pin
m-khansari15-Dec-09 23:02
m-khansari15-Dec-09 23:02 
QuestionGetting Server control Id with JavaScript code... Pin
tunsten12-Dec-09 2:03
tunsten12-Dec-09 2:03 
AnswerRe: Getting Server control Id with JavaScript code... Pin
Abhijit Jana12-Dec-09 2:13
professionalAbhijit Jana12-Dec-09 2:13 
GeneralRe: Getting Server control Id with JavaScript code... Pin
tunsten12-Dec-09 2:25
tunsten12-Dec-09 2:25 
AnswerRe: Getting Server control Id with JavaScript code... Pin
Iman Ebadi12-Dec-09 2:45
Iman Ebadi12-Dec-09 2:45 
GeneralRe: Getting Server control Id with JavaScript code... Pin
tunsten12-Dec-09 2:58
tunsten12-Dec-09 2:58 
AnswerRe: Getting Server control Id with JavaScript code... Pin
Abhishek Sur12-Dec-09 10:02
professionalAbhishek Sur12-Dec-09 10:02 
Just replace

<asp:LinkButton ID="lbSave" runat="server" onClientClick="ValidateAssetCategory()" onClick="lbSave_Click" />

with

<asp:LinkButton ID="lbSave" runat="server" onClientClick="return ValidateAssetCategory()" onClick="lbSave_Click" />

And from your Javascript function ValidateAssetCategory return true if you need server side to execute, otherwise put false.

function ValidateAssetCategory()
{
 if(...) return true;
else return false; // This will not invoke lbSave_Click in server side. 
}


Cheers.

Abhishek Sur
Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->

Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using Javascript

GeneralRe: Getting Server control Id with JavaScript code... Pin
tunsten15-Dec-09 5:07
tunsten15-Dec-09 5:07 
AnswerRe: Getting Server control Id with JavaScript code... Pin
m-khansari12-Dec-09 3:30
m-khansari12-Dec-09 3:30 
GeneralRe: Getting Server control Id with JavaScript code... Pin
tunsten15-Dec-09 5:05
tunsten15-Dec-09 5:05 
QuestionPopup from a GridView control... Pin
tunsten12-Dec-09 1:51
tunsten12-Dec-09 1:51 
AnswerRe: Popup from a GridView control... Pin
Abhijit Jana12-Dec-09 1:57
professionalAbhijit Jana12-Dec-09 1:57 
GeneralRe: Popup from a GridView control... Pin
tunsten12-Dec-09 2:14
tunsten12-Dec-09 2:14 
GeneralRe: Popup from a GridView control... Pin
Abhijit Jana12-Dec-09 2:21
professionalAbhijit Jana12-Dec-09 2:21 
GeneralRe: Popup from a GridView control... Pin
tunsten12-Dec-09 2:28
tunsten12-Dec-09 2:28 
QuestionSending mail from asp.net.. need help Pin
Hema Bairavan11-Dec-09 23:47
Hema Bairavan11-Dec-09 23:47 
AnswerRe: Sending mail from asp.net.. need help Pin
Abhijit Jana12-Dec-09 1:43
professionalAbhijit Jana12-Dec-09 1:43 
GeneralRe: Sending mail from asp.net.. need help Pin
farogh haider14-Dec-09 18:45
farogh haider14-Dec-09 18:45 
QuestionCrystal Report Pin
mylogics11-Dec-09 23:25
professionalmylogics11-Dec-09 23:25 
AnswerRe: Crystal Report Pin
Abhijit Jana12-Dec-09 1:52
professionalAbhijit Jana12-Dec-09 1:52 
AnswerRe: Crystal Report Pin
123ammu19-Oct-11 1:30
123ammu19-Oct-11 1:30 
QuestionDIV Formating Pin
Sasmi_Office11-Dec-09 23:22
Sasmi_Office11-Dec-09 23:22 
AnswerRe: DIV Formating Pin
Abhishek Sur12-Dec-09 6:11
professionalAbhishek Sur12-Dec-09 6:11 
Questionautocompleteextender list and calenderextender list shows behind other controls Pin
vikas shukla11-Dec-09 23:21
vikas shukla11-Dec-09 23:21 

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.