Click here to Skip to main content
15,890,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can we set height & width of .aspx page
Posted

you can defune a class in CSS and set height and width for this then use this class for base tag of your aspx page
 
Share this answer
 
 
Share this answer
 
you can set the height and width for the page by setting the body style as follows:
HTML
<body style=" margin:0px;width:600px; height:90%;" >
 
Share this answer
 
v2
Comments
Mas11 17-Apr-12 5:57am    
it doesnt work, i use this page in crystal report.
u can use table tag as container for tour page.and give width & height to table.
 
Share this answer
 
Use Theme or style sheets (.css) This can help you to design your asp.net page
 
Share this answer
 
Comments
Mas11 17-Apr-12 2:28am    
No i want new window open on button click with some height & width
djrocks0101 17-Apr-12 2:32am    
then try javascript code onclick event of button

window.onload = function() {
var w = window.open("about:blank",
"main", "width=640,height=480",
true)
window.opener = "main";
window.open("", "_parent",
"");
w.opener.close();
}
Mas11 17-Apr-12 5:57am    
i also try this code but it doesnt work..
djrocks0101 17-Apr-12 9:41am    
show me your code..
Mas11 18-Apr-12 0:37am    
function window()
{
if( document.form1.HiddenField1.value=="1")
{
window.focus();
window.open('MyRepo_Print.aspx', null,'width=800, height=570');
return true;
}
else
{
window.open('', null,'width=800, height=570');
return true;
}
}

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900