Click here to Skip to main content
15,891,657 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: ASP.NET 2.0 - Adding controls at runtime? Pin
Guffa19-Oct-06 20:18
Guffa19-Oct-06 20:18 
GeneralRe: ASP.NET 2.0 - Adding controls at runtime? Pin
Member 9620-Oct-06 4:11
Member 9620-Oct-06 4:11 
AnswerRe: ASP.NET 2.0 - Adding controls at runtime? Pin
Guffa16-Oct-06 9:21
Guffa16-Oct-06 9:21 
QuestionRuntime in Asp.Net 2.0 Pin
shapper16-Oct-06 6:27
shapper16-Oct-06 6:27 
QuestionRequested Clipboard operation did not succeed Pin
ampk16-Oct-06 5:40
ampk16-Oct-06 5:40 
QuestionOn DIV tag Pin
sribachana16-Oct-06 4:22
sribachana16-Oct-06 4:22 
AnswerRe: On DIV tag Pin
Mike Ellison16-Oct-06 5:54
Mike Ellison16-Oct-06 5:54 
AnswerRe: On DIV tag Pin
Mike Ellison16-Oct-06 6:47
Mike Ellison16-Oct-06 6:47 
Here's a more fleshed-out example:
<html>
  <head>  
    <style>
      div.myDiv {font-size: 10pt; font-family: Tahoma; 
                 border: 1px solid #999999;
                 background-color: yellow;
                 width: 18px; height: 18px;
                 position: absolute;
                 text-align: center;
                 vertical-align: center;  
                 font-weight: bold;         
                 color: darkBlue;      
                 }
                 
    </style>  
    <script>
    function findPos(obj) {
	  var curleft = curtop = 0;
	  if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	  }
	  return [curleft,curtop];
    }         
      function MoveDiv(x, y)
      {
          var div = document.getElementById("MyDiv");
          div.style.left = x;
          div.style.top = y;
      }
      
      function MoveToButton(btn)
      {
        var pos = findPos(btn);
        var width = btn.offsetWidth;
        var height = btn.offsetHeight;
        var x = (width / 2) + pos[0];
        var y = (height - 6) + pos[1];
        MoveDiv(x,y);
      }
      
    </script>
  </head>
  
  <body>
    <h3>Testing a client-side element move</h3>
    <p>Div defined below:</p>
    <div id="MyDiv" class="myDiv">
      @
    </div>
    <br /><br />
    
    <hr />
    <input type="button" value="Click to move it here" 
           o n c l i c k = "MoveToButton(this);"
           />
    <input type="button" value="Click to move it here" 
           o n c l i c k = "MoveToButton(this);"
           />
    <input type="button" value="Click to move it here" 
           o n c l i c k = "MoveToButton(this);"
           />
    <br /><br />
    <input type="button" value="Click to move it here" 
           o n c l i c k = "MoveToButton(this);"
           />
    <input type="button" value="Click to move it here" 
           o n c l i c k = "MoveToButton(this);"
           />
    <input type="button" value="Click to move it here" 
           o n c l i c k = "MoveToButton(this);"
           />
               
    <br /><br /><br /><br />
    <a href="#";
       o n m o u s e o v e r = "MoveToButton(this);"
       >MouseOver move</a>
     
    <a href="#";
       o n m o u s e o v e r = "MoveToButton(this);"
       >MouseOver move</a>
    
  </body>
  
</html>

Questioninclude aspx in anotherasp Pin
mamatha_raghu16-Oct-06 3:33
mamatha_raghu16-Oct-06 3:33 
AnswerRe: include aspx in anotherasp Pin
Andrei_KS16-Oct-06 5:11
Andrei_KS16-Oct-06 5:11 
Question!include aspx in anotheraspx Pin
mamatha_raghu16-Oct-06 3:31
mamatha_raghu16-Oct-06 3:31 
AnswerRe: !include aspx in anotheraspx Pin
_AK_16-Oct-06 18:43
_AK_16-Oct-06 18:43 
GeneralRe: !include aspx in anotheraspx Pin
mamatha_raghu16-Oct-06 19:03
mamatha_raghu16-Oct-06 19:03 
GeneralRe: !include aspx in anotheraspx Pin
_AK_16-Oct-06 19:19
_AK_16-Oct-06 19:19 
GeneralRe: !include aspx in anotheraspx Pin
mamatha_raghu16-Oct-06 19:50
mamatha_raghu16-Oct-06 19:50 
GeneralRe: !include aspx in anotheraspx Pin
_AK_16-Oct-06 20:06
_AK_16-Oct-06 20:06 
GeneralRe: !include aspx in anotheraspx Pin
mamatha_raghu16-Oct-06 21:08
mamatha_raghu16-Oct-06 21:08 
GeneralRe: !include aspx in anotheraspx Pin
_AK_18-Oct-06 21:02
_AK_18-Oct-06 21:02 
QuestionEvents in ASP.NEt Pin
Nandini Sharma16-Oct-06 3:23
Nandini Sharma16-Oct-06 3:23 
AnswerRe: Events in ASP.NEt Pin
Guffa16-Oct-06 3:34
Guffa16-Oct-06 3:34 
QuestionRegarding calculating total amoun of memory and cpu used. Pin
VishalSharmaDev16-Oct-06 3:13
VishalSharmaDev16-Oct-06 3:13 
AnswerRe: Regarding calculating total amoun of memory and cpu used. Pin
Dustin Metzgar16-Oct-06 4:03
Dustin Metzgar16-Oct-06 4:03 
Questionpass the values of variable in code Behind Pin
Naif_Prof16-Oct-06 3:05
Naif_Prof16-Oct-06 3:05 
AnswerRe: pass the values of variable in code Behind Pin
perlmunger16-Oct-06 4:37
perlmunger16-Oct-06 4:37 
QuestionRe: pass the values of variable in code Behind Pin
Naif_Prof16-Oct-06 8:34
Naif_Prof16-Oct-06 8:34 

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.