Click here to Skip to main content
15,890,506 members
Home / Discussions / C#
   

C#

 
AnswerRe: Pass an argument to use with a foreach loop Pin
sam#11-May-10 0:57
sam#11-May-10 0:57 
AnswerRe: Pass an argument to use with a foreach loop Pin
Luc Pattyn11-May-10 2:20
sitebuilderLuc Pattyn11-May-10 2:20 
Questiongetting ini value Pin
Member 59031010-May-10 22:27
Member 59031010-May-10 22:27 
AnswerRe: getting ini value Pin
OriginalGriff10-May-10 22:49
mveOriginalGriff10-May-10 22:49 
AnswerRe: getting ini value Pin
PIEBALDconsult11-May-10 3:38
mvePIEBALDconsult11-May-10 3:38 
QuestionSending data through SOAP Pin
Priya Prk10-May-10 21:49
Priya Prk10-May-10 21:49 
AnswerRe: Sending data through SOAP Pin
Abhinav S10-May-10 22:33
Abhinav S10-May-10 22:33 
QuestionPrint Visitor Card Pin
Hakmeh Mohannad10-May-10 21:49
Hakmeh Mohannad10-May-10 21:49 
hi everyone,
In the project am working on i have list of user which i can select multiple user and then click on print form or card

for form it is already done all am doing is to build the table inside a string then pass it the the following JavaScript

function printDiv() {      <br />
     var ToEdit1 = document.getElementById('ListParticipantsUC1_hdnToPrint').value;<br />
     var ToEdit2 = ToEdit1.replace(/=&quot;/g, "'"); <br />
     var ToPrint = ToEdit2.replace(/&lt;/g,"<");<br />
     var WinPrint = window.open('','','left=0,top=0,width=1,height=1,toolbar=0,scrollbars=0,status=0');<br />
     var report = '<head><META name="WebPartPageExpansion" content="full"><META name="WebPartPageExpansion" content="full"><META name="WebPartPageExpansion" content="full">';<br />
     report = report + '<link href="includes/En/print.css" type="text/css" rel="stylesheet" media="print,screen"/></head>';<br />
     report = report + '<style>.break { page-break-before: always; }</style><body><table width="100%">';<br />
     report = report + '<tr><td>';<br />
     WinPrint.document.write(report + ToPrint + '</td></tr></table></body>');<br />
     WinPrint.document.close();<br />
     WinPrint.focus();<br />
     WinPrint.print();<br />
     WinPrint.close();     <br />
       }



but when it came to print the card i had to add table on the page because it contain 4 images that i read from database, so after filling all the information including the images, i render the whole page and save it to a string and pass it as the form

StringWriter sw = new StringWriter();
HtmlTextWriter w = new HtmlTextWriter(sw);
areaToPrint.RenderControl(w);
HtmlCode = HtmlCode + sw.GetStringBuilder().ToString();


but i cannot control its position or anything at print time

any suggestions or new methods to print the card
Questionvss and visual studio Pin
Zeyad Jalil10-May-10 21:23
professionalZeyad Jalil10-May-10 21:23 
AnswerRe: vss and visual studio Pin
R. Giskard Reventlov10-May-10 21:27
R. Giskard Reventlov10-May-10 21:27 
AnswerRe: vss and visual studio Pin
Abhinav S10-May-10 21:28
Abhinav S10-May-10 21:28 
GeneralRe: vss and visual studio Pin
Zeyad Jalil10-May-10 22:27
professionalZeyad Jalil10-May-10 22:27 
AnswerRe: vss and visual studio Pin
Michel Godfroid10-May-10 22:49
Michel Godfroid10-May-10 22:49 
GeneralRe: vss and visual studio Pin
Zeyad Jalil10-May-10 23:00
professionalZeyad Jalil10-May-10 23:00 
GeneralRe: vss and visual studio Pin
Michel Godfroid10-May-10 23:04
Michel Godfroid10-May-10 23:04 
GeneralRe: vss and visual studio Pin
Zeyad Jalil10-May-10 23:26
professionalZeyad Jalil10-May-10 23:26 
GeneralRe: vss and visual studio Pin
Michel Godfroid10-May-10 23:40
Michel Godfroid10-May-10 23:40 
GeneralRe: vss and visual studio Pin
Zeyad Jalil11-May-10 0:11
professionalZeyad Jalil11-May-10 0:11 
GeneralRe: vss and visual studio Pin
Michel Godfroid11-May-10 0:44
Michel Godfroid11-May-10 0:44 
QuestionGetting IP Address in C# Pin
Beulshere10-May-10 20:03
Beulshere10-May-10 20:03 
AnswerRe: Getting IP Address in C# Pin
Peace ON10-May-10 20:29
Peace ON10-May-10 20:29 
QuestionRe: Getting IP Address in C# Pin
Michel Godfroid10-May-10 20:39
Michel Godfroid10-May-10 20:39 
Questionestblishing a conection of a excel sheet with C# application Pin
swtlibra10-May-10 19:30
swtlibra10-May-10 19:30 
AnswerRe: estblishing a conection of a excel sheet with C# application Pin
Ankur\m/10-May-10 19:42
professionalAnkur\m/10-May-10 19:42 
QuestionHow to Check the RowType with Database Type [modified] Pin
Nandakumar.n.pai10-May-10 19:21
Nandakumar.n.pai10-May-10 19:21 

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.