Archive for October, 2012

How to disable link button asp.net

{0 Comments}

To disabling a link button is bit challenging but, I am sure what so challenging in that we can do this just putting following code in the on click function of the link button and it get disabled perfectly.  C# |  copy code |? 1LinkButton1.Enabled = false; But the problem really arises when you try to disable link button from …

Read More…

How to change color of linkbutton in asp.net

{0 Comments}

In this article you will know how to change linkbutton color using JavaScript on clicking on them. For this I have created an asp linkbutton and then add this following JavaScript   Javascript |  copy code |? 1<script>2 function changeColor(e)3 {4 e.style.color = "red";5 return false;6 }7 </script> After adding above JavaScript I finally add this property of change color function …

Read More…

How to change the color of disabled link button

{0 Comments}

We always get the same black boring text after the link button gets disabled. Most of time it gets merges in the text too. So after getting disable if you need to change color then you can follow these steps.  Create a css class for your disabled linkbutton mine is below.  CSS |  copy code |? 1<style type="text/css">2 .LnkBtn3 {4 …

Read More…

How to create dynamic linkbutton in asp.net

{0 Comments}

To create dynamic link button then use the following code which will remain same to make any control in asp.net. I have tested on many of them. And lastly don’t forget to add the same to the form of the asp.net page otherwise it will through an error. Then code for that is as follows. …

Read More…

Disable copy paste in pdf in asp.net

{0 Comments}

While you are making online book reading like website and you want that your user should not copy and paste your valuable pdf file then Google has provided way to make your pdf very secure. Follow this step and see the magic Most important requirement is that the pdf you want to show in secure …

Read More…

Disable copy paste in textbox asp.net

{0 Comments}

When you make a application where there is need of genuine user input, but most of time user tend to copy and paste in your provided text box where it is single line and multiline textbox. Then you can active these properties as shown below  C# |  copy code |? 1<asp:TextBox ID="TextBox1" oncopy="return false" onpaste="return false" oncut="return false"2 runat="server" />

Read More…

How to disable copy paste in asp.net

{0 Comments}

Most of clients want to disable copy and paste system in their project, to save their valuable text then we have to stop most of the function of browser like copy, paste, and right-click and view source option. There is need of very strong script to provide at least this type of security. So the …

Read More…

How to get browser close event in asp.net

{0 Comments}

in most of cases when there is need to do something on closing of the browser windows. In asp.net we can get the desired work done on closing event of browser.  For this we can use JavaScript which detect the close event and do some thing after detection.   Javascript |  copy code |? 1<script type="text/javascript">2 window.onbeforeunload = function(e) {3 // …

Read More…

How to add event to dynamic control (button) asp.net

{0 Comments}

When there is need to assign a event to an dynamically created button and controls. Then we can use Command Argument associated with that control. The value assigned to this command argument is passed to an event handler which will work in similar manner in which your default static button works. To understand this process …

Read More…