Click here to Skip to main content
15,912,400 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: i got error on gridview in allowPaging = true - asp.net Pin
TweakBird19-Jan-11 8:20
TweakBird19-Jan-11 8:20 
GeneralRe: i got error on gridview in allowPaging = true - asp.net Pin
Dhyanga19-Jan-11 10:03
Dhyanga19-Jan-11 10:03 
GeneralRe: i got error on gridview in allowPaging = true - asp.net Pin
goldsoft19-Jan-11 19:14
goldsoft19-Jan-11 19:14 
GeneralRe: i got error on gridview in allowPaging = true - asp.net Pin
TweakBird19-Jan-11 19:33
TweakBird19-Jan-11 19:33 
QuestionAny ASP.NET MVC open-source role management GUIs? Pin
Dimitri Witkowski18-Jan-11 21:34
Dimitri Witkowski18-Jan-11 21:34 
AnswerRe: Any ASP.NET MVC open-source role management GUIs? Pin
Sandeep Mewara22-Jan-11 8:36
mveSandeep Mewara22-Jan-11 8:36 
GeneralRe: Any ASP.NET MVC open-source role management GUIs? Pin
Dimitri Witkowski22-Jan-11 8:55
Dimitri Witkowski22-Jan-11 8:55 
QuestionJavascript Confirmation box not working from code behing Pin
meeram39518-Jan-11 21:21
meeram39518-Jan-11 21:21 
I have a checkbox in my page which is autopostback true. If the user clicks on the checkbox,
I want to display a confirmation text box in javascript, and if the user clicks on Ok,
then only the postback should occur, otherwise not. Even though the js is working and
confirmation box displays, no postback is happening.

Below is my code:

Javascript code:

function ReportConfirmation() {

          if (confirm("Proceeding with Output File Generation ? ")) {

             return true;
          }
          else {

              return false;
          }
      }

<asp:CheckBox runat="server" ID="chkGenerateRpt" AutoPostBack="true" OnCheckedChanged="chkGenerateRpt_CheckedChanged" Text="Generate Reports"/&gt;


Code-Behind in PageLoad (outside the IsPostBack):
chkGenerateRpt.Attributes.Add("OnClick", "javascript:return ReportConfirmation(); ");



protected void chkGenerateRpt_CheckedChanged(object sender, EventArgs e)
       {
           if (chkGenerateRpt.Checked)
           {
             // do some stuff
            }
       }


If i remove return from the pageload code above, the page will work irrespetive of
whether the user clicks on cancel or Ok button in confirmation box? Could anybody
please help in finding out the error?

Thanks in advance
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.

AnswerRe: Javascript Confirmation box not working from code behing Pin
Ankur\m/19-Jan-11 0:20
professionalAnkur\m/19-Jan-11 0:20 
GeneralRe: Javascript Confirmation box not working from code behing Pin
meeram39519-Jan-11 13:49
meeram39519-Jan-11 13:49 
GeneralRe: Javascript Confirmation box not working from code behing Pin
Ankur\m/19-Jan-11 17:37
professionalAnkur\m/19-Jan-11 17:37 
Questiondr LUPP Pin
swaroops18-Jan-11 21:03
swaroops18-Jan-11 21:03 
AnswerRe: dr LUPP Pin
Manfred Rudolf Bihy19-Jan-11 9:49
professionalManfred Rudolf Bihy19-Jan-11 9:49 
Questioncustom datalist control Pin
Ersan Ercek18-Jan-11 10:01
Ersan Ercek18-Jan-11 10:01 
AnswerRe: custom datalist control Pin
thatraja18-Jan-11 14:42
professionalthatraja18-Jan-11 14:42 
GeneralRe: custom datalist control Pin
Ersan Ercek18-Jan-11 21:05
Ersan Ercek18-Jan-11 21:05 
AnswerRe: custom datalist control Pin
Yusuf18-Jan-11 15:07
Yusuf18-Jan-11 15:07 
GeneralRe: custom datalist control Pin
Ersan Ercek18-Jan-11 21:05
Ersan Ercek18-Jan-11 21:05 
Questionprevent Multiple users updating same record same time and same table Pin
vishnukamath16-Jan-11 19:09
vishnukamath16-Jan-11 19:09 
AnswerRe: prevent Multiple users updating same record same time and same table Pin
Pete O'Hanlon16-Jan-11 22:40
mvePete O'Hanlon16-Jan-11 22:40 
AnswerRe: prevent Multiple users updating same record same time and same table Pin
thatraja17-Jan-11 15:43
professionalthatraja17-Jan-11 15:43 
AnswerRe: prevent Multiple users updating same record same time and same table Pin
Dalek Dave4-Mar-11 13:25
professionalDalek Dave4-Mar-11 13:25 
QuestionWebsite is hacked sporadicaly ! Pin
devboycpp16-Jan-11 6:50
devboycpp16-Jan-11 6:50 
AnswerRe: Website is hacked sporadicaly ! Pin
luisnike1916-Jan-11 7:40
luisnike1916-Jan-11 7:40 
AnswerHow long is a piece of string? Pin
Keith Barrow16-Jan-11 8:23
professionalKeith Barrow16-Jan-11 8:23 

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.