.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to add password on a button when clicked

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :ASP.Net

Hi Masters,

I would like to ask on how to add a password on a button when it is clicked

before doing the bottons task. I have add button and i want to add security

on it. I want it that before it adds new entry it will ask first the password.

Thanks a lot,


View Complete Post

More Related Resource Links

Code Behind (C#) - Postback - "If (this button was clicked) postback to this address, otherwise, do

Hello!!I have three buttons at the bottom of my form. Two of the buttons make the form invisible and make a Success message Visible.I need all three buttons to call SubmitForm Function to send us an email with the completed form.The third button is a PayPal button which I would like to postback to a different url after submitting the form via email.How can I change its Postback url in C# in the code behind.P.S. I tried Server.Transfer... got an errorThanks

Disable a link button in grid view after it is clicked

I have a grid view with each row as a link button. When I click on the row, some data parsing process takes place (about a 15 sec process). The grid refreshes itself at a regular interval. I want to disable the link when it is clicked once, so that the user gets to know that row has been processed already and does not click it again, until the grid refreshes itself and the row disappears. I am copying my gridview code below. Please give me some idea on how to disable the link button on that row as soon as it is clicked.Thank You. <td rowspan = "4" valign = "top" > <asp:Label ID="gvOrdersQueueLabel" runat="server" ></asp:Label><br /> <asp:UpdatePanel runat="server" ID="updatePane1"> <ContentTemplate> <asp:GridView ID="gvOrdersQueue" runat="server" OnRowCommand = "ParseOrderMessage" EmptyDataText="No Cases Found" BorderStyle = "Double" AlternatingRowStyle-BackColor="Beige" EnableViewState="false" AutoGenerateColumns="False" HeaderStyle-Height = "20" RowStyle-Height = "20" AllowPaging ="true" PageSize = "20" OnPageIndexChanging="gridView_PageIndexC

Content cutoff in Print preview screen when a print button is clicked from a WPF application in Dell

Hello, I am facing a problem in printing.. I have a WPf+windows application running on the Dell Mini Net book(10") with screen resolution 1366 x 768. I am trying to the print the page with heading, image & some measurements on a 81/2 x 11. the print preview seem to be ok on the desktop(screen resolution 1440 x 900). but when i run same application in dell mini the layout is cutoff, the text is started from the footer area,  the page is not shown completely.. Can any one help me in this regard??   Thanks for the help in advance Archana

How can i check if button clicked inside a button click event?


private void View_Log_File_Click(object sender, EventArgs e)
                processNotePad = System.Diagnostics.Process.Start("notepad.exe", path_exe + @"\log\logger.txt");


It was easy to check it inside a checkbox event for example:


private void Show_satistics_CheckedChanged(object sender, EventArgs e)


             if (Show_satistics.Checked)
                     statform = new StatisticForm();

In UserControl, FooCmdCanExecute (context menu) not called until after a control button is clicked.


I'm seeing an odd behavior I can't explain.  I am using a 3rd party control, and while it's possible it's an issue with that control, I wanted to inquire here to see if anyone has experienced similar behavior in other instances (unrelated to my particular 3rd party control).

I created a UserControl, comprising a ComponentONE chart and several buttons.  When the UserControl is given a data source (for the chart), it programmatically creates a ContextMenu that allows the user to configure the Y view extent for each of the data series provided in the data source.  After it's created, it's set as the ContextMenu for the chart.  The UserControl is used inside a tab on the app's main window, and is also plunked directly inside another window that can be brought up.

The UserControl defines a RoutedCommand - let's say FooCmd.  When the MenuItems for the context menu are created, their Command properties are set to FooCmd.  Also, a CommandBinding in the UserControl associates FooCmdCanExecute() and FooCmdExecuted() in the control class with the command.

The buttons in the UserControl are for data navigation - e.g. , there's one that moves the chart's "viewport" to the beginning of the data, and one for the "end".  The click handlers are not complex - essentially, they just set

Identify which button has been clicked


I have a browser enabled infopath form. I have 3 buttons in that form and all of them have submit functionality so when button is clicked the form submit event is fired.

Now the problem is that i want to identify which button was clicked in form submit event

For information, I am submitting infopath form programmatically, i have written code to submit form in form submit event

Does anyone has idea to identify which button was clicked?

Thanks in advance,



Button clicked event on hitting enter in any textbox




I have a WPF form with some element on it (textbox, datagrid, button...). I have an "OK" button which will handle the form when I click on it. How could I call that event handler on every "Enter"? I mean if I hit enter key in any of the form element I want to process everything like when I clicked on "OK" button.




How to Send a Page in email body and get the response when he clicked the button?


Hi all,

I want to send an email which contain an aspx page in the mail body and when the user fill the data in the textboxex and clicked the Button the data should be stored in the SharePoint List(Button Logic Should be execute).

Please tell me how we can acheive this........

thanks in advance...............

How to know whether the close button on browser has been clicked


Hi All,

 I want to perform some session and application related activities on server side, when the close button of browser is clicked.


1. I have handled it using 'OnBeforeUnload' in body tag of master page

2. but it is getting fired for even if the end user navigates to other page.

3. so my requirement is to call the code on server side, only iff, the close button of the browser is clicked.

Thanks in Advance..


Hi guys,

This is still unsolved problem. Because according to mudassarkhan, if i apply his solution, then everything is ok.

but when the page is regreshed, the value of clicked variable becomes false and undesired action happens once again.

Please come with some solution..guys..

stop page refreshing when the image button clicked


hi friends,

      I am struggling on stop page refreshing when the image button is clicked.How i can i achieve this?I used triggers,javascript,........

             Thanks in advance.

When User Clicked on Save Button Result Should be visible and Grid View Text Fields should be visibl


Hi Friends,

   I am Ali, My Issue is

1. I have 'Result Management Form', in this form after entering Subject marks(In Grid View), i clicked on Save Button. (Result: When i click on Save Button totlal marks should be visible in Lable)

2. But when  i click on Save Button Subject marks 'Text Fields' are going to empty. and not visibling Total marks in Lable.

Here i am using this code

for (int i = 1; i < st_data.Rows.Count; i++)
int tot = 0;
for (int j = 3; j < st_data.Columns.Count-1; j++)
st[j] = st_data.Rows[i].Cells[j].Text;
tot = tot +int.Parse(st[j]);


Any Ideas



MD.Liakath ali

Non-updatable page fields in the previous pages when clicked on back button.



I have the  following scenario.

I have four pages and user enters certain information and navigates to  the next page. In the last page, when user clicks on submit button it will redirect him to the confirmation page. Once the user is in the confirmation page and clicks on back button, all the fields in the previous pages must be non-updatable.

Note: User can use the back button to view his previous data but not-updatable anymore.

Can you please post some code for the above scenario ?

How to check if button is clicked in JQuery



How can i check if a button is clicked in a IF ELSE???


Client side validation while "OK" button clicked in list in sharepoint 2007


Hi All,

while saving data to a list in sharepoint all the validation are server side ,can i do it client side in sharepoint 2007

Thanks and Regards Er.Pradipta Nayak

MVVM Bind View Details to Model Via ViewModel when a Button clicked.


I have model called Car with prperties name,model,type,year.

I have implemeted the Viewmodel with same properties with OnpropertyChangedEvent including model object type Property.

I have a view usercontrol where textboxes for name, model and for year a combobox.

Whenever i fill the view i want to save those details into model via view model

I have written ICommand  Save which calls SaveCarDetails defined in viewmodel,  which is bind to a button in view ,All other texboxes text is bind to the properties of viewmodel properties.

When i put break point at ICommand SaveCommand and SaveCarDetails Function i could see the values filled from view.

But when i bind these details to another user control where listbox is placed and its itemsource property is set to Car property nothing but model object defined in the viewmodel.

I couldn't see the values binding via viewmodel to model.

Where as if i bind to textboxes in the listview i could see the values because i it's a dependency property.

Can any one please tell me what is the wrong i am doing here.




Problem to group radio button across gridview rows

In general no one can easily group or make a single selection from radio button list inside gridview rows. There are a lot of way to make a single or unique selection from list. Here i want to share how i can address this problem in the most easiest way. Googling the problem most of the cases i saw the grouping in horizontal way. Thats why i tried to group the radio buttons in vertical manner. Let i have a requirement like below:

Maintain HTML Radio Button Selection Inside GridView After Postback

Long time ago I wrote an article about getting the value of the selected RadioButtons inside the GridView control. The code did not addresssed the postback issue which means that the selected radio button was cleared after the postback occurs.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend