Click here to Skip to main content
15,908,776 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Page_PreInit() Pin
Brij28-Aug-08 21:24
mentorBrij28-Aug-08 21:24 
AnswerRe: Page_PreInit() Pin
Gamzun1-Sep-08 21:25
Gamzun1-Sep-08 21:25 
Questionget path to client desktop Pin
kani9828-Aug-08 13:42
kani9828-Aug-08 13:42 
AnswerRe: get path to client desktop Pin
Christian Graus28-Aug-08 15:57
protectorChristian Graus28-Aug-08 15:57 
GeneralRe: get path to client desktop Pin
kani9829-Aug-08 6:07
kani9829-Aug-08 6:07 
AnswerRe: get path to client desktop Pin
metallica_rock1028-Aug-08 18:52
metallica_rock1028-Aug-08 18:52 
QuestionHow to Set Printer Settings Programatically? Pin
D4ever28-Aug-08 8:24
D4ever28-Aug-08 8:24 
AnswerRe: How to Set Printer Settings Programatically? Pin
Abhishek Sur28-Aug-08 9:32
professionalAbhishek Sur28-Aug-08 9:32 
u can set printer settings from the dialog box that comes when window.print is invoked... Check Properties...

You cant change the default settings of the PRint dialog box from code. Its because of security issue..

But there is a way for IE users to call WScript.Shell. try out the code:

<pre>var shell;
function SetPrintProperties() {
try {
shell = new ActiveXObject("WScript.Shell");
shell.SendKeys("%fu");
window.setTimeout("javascript:SetPaperSize();", 400);
} catch (e) {
alert('Please verify that your print settings have a Landscape orientation and minimum margins.');
}
}

function SetPaperSize() {
shell.sendKeys("%a{TAB}.2{TAB}0{TAB}0{TAB}0{ENTER}");
}</pre>

But I dont recommend this as its browser specific and not a good practice to change settings without users consent.... Rose | [Rose]

Abhishek Sur

GeneralRe: How to Set Printer Settings Programatically? Pin
D4ever30-Aug-08 23:57
D4ever30-Aug-08 23:57 
AnswerRe: How to Set Printer Settings Programatically? Pin
N a v a n e e t h28-Aug-08 18:18
N a v a n e e t h28-Aug-08 18:18 
QuestionRequired a Message using DIV Pin
slSoftware28-Aug-08 7:18
slSoftware28-Aug-08 7:18 
AnswerRe: Required a Message using DIV Pin
Abhishek Sur28-Aug-08 9:36
professionalAbhishek Sur28-Aug-08 9:36 
GeneralRe: Required a Message using DIV Pin
slSoftware29-Aug-08 4:53
slSoftware29-Aug-08 4:53 
QuestionProblem With Grid View Header Pin
Anudeep Jaiswal28-Aug-08 5:33
Anudeep Jaiswal28-Aug-08 5:33 
AnswerRe: Problem With Grid View Header Pin
mghiassi28-Aug-08 8:03
mghiassi28-Aug-08 8:03 
GeneralRe: Problem With Grid View Header Pin
Anudeep Jaiswal29-Aug-08 0:16
Anudeep Jaiswal29-Aug-08 0:16 
AnswerRe: Problem With Grid View Header Pin
D4ever28-Aug-08 8:40
D4ever28-Aug-08 8:40 
QuestionAdding a Combobox in a Datagridview ASP.NET Pin
Vimalsoft(Pty) Ltd28-Aug-08 4:58
professionalVimalsoft(Pty) Ltd28-Aug-08 4:58 
AnswerRe: Adding a Combobox in a Datagridview ASP.NET Pin
AlexeiXX328-Aug-08 11:41
AlexeiXX328-Aug-08 11:41 
QuestionPositioning a Web User Control Pin
Gretna28-Aug-08 3:26
Gretna28-Aug-08 3:26 
AnswerRe: Positioning a Web User Control Pin
Abhishek Sur28-Aug-08 9:39
professionalAbhishek Sur28-Aug-08 9:39 
QuestionMethods being generated in the wrong place [solved] Pin
Richard Jones28-Aug-08 2:59
Richard Jones28-Aug-08 2:59 
AnswerRe: Methods being generated in the wrong place Pin
Bardy8528-Aug-08 4:45
Bardy8528-Aug-08 4:45 
AnswerRe: Methods being generated in the wrong place Pin
Abhishek Sur28-Aug-08 9:42
professionalAbhishek Sur28-Aug-08 9:42 
GeneralRe: Methods being generated in the wrong place Pin
Richard Jones28-Aug-08 9:46
Richard Jones28-Aug-08 9:46 

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.