12 March 2008

Check that how strong or best password you have!!!



Click here

04 March 2008

I have a web page with master page.

Now there is a functionality to "Print This Page", but not full page only one table form that. and it's value comes form database.

There is one want to open a page and load that same information form database. but using javascript, it's become so easier.

Let's check...



you can see that, there is some content with master page, Now I just want to print detail page, but not master page.

so I need to give ID to that control which one I want to print,

for example:

table id="tblResult"

and right down some javascript into this page.

script language="javascript">

function OpenWindow()
{

var printContent = document.getElementById("tblPrint");
var sFeatures = "height=200,width=300,status=no,toolbar=no,menubar=no,location=no";

win = window.open("","Print", sFeatures);
win.document.write(printContent.innerHTML);
win.document.close();
win.focus();
win.print();
win.close();

}

script>


Now, right down onClick event = " OpenWindow()" in button.

Finally you click on "Print" button, It will open a new popup window and it will see also open a print dialogbox.




getElementById(IDName).innerHTML will do this job.

Now Visual Studio 2008 have small name of "
getElementById" and that is "$get".