Somebody know way to print in duplex. So i have problem, because i have summary file where is a lot of statements. I have to print in duplex and problem is with print it, because sometimes statements have odd numer page and last page is print on first page next statement.
Have somebody any idea.
Thanks!
Related
I have read most, if not all, of the related questions on the site, but I don't see the same problem described, so...
I am generating some webforms code (both .aspx and .aspx.cs files), however my problem seems to be confined to the .aspx files only (the 'display' side).
When I open a file that was generated with my tool, some lines of code are combined on a single line in the VS2013 editor, and some lines of code are not.
I modified the code generator to add a System.Environment.NewLine at the end of every line to see if I could produce consistency. This was obviously the wrong action to take. It did solve the problem of some lines of code being concatenated horizontally in the editor, but other lines of code are now consistently double-spaced.
This different treatment of the line-endings appears to work differently between:
(1) JavaScript code and plain text lines -- I have to insert the .NewLine at the end of every JavaScript line and every line that might contain simple text to get a separate line.
(2) HTML and asp.net/html code -- if I insert a .NewLine at the end of these lines of code they will come out double-spaced.
I realize I can address this by modifying my code generator to handle the different types of code in different manners, but does anyone know why these lines of code would be handled differently to begin with? I'm just trying to learn and understand where these characteristics are coming from. Altering the Advanced Save Options doesn't seem to have any effect on this situation.
Thanks in advance!
Lynn
Thanks for the consideration over the week-end. It is most appreciated.
The line of code that is introducing the System.Environment.NewLine is:
SrcCode_Data.SrcCodeCode = SourceText_Data.SourceTextCode + System.Environment.NewLine;
The generated data (the contents of SrcCode_Data.SrcCodeCode above) contains:
" function SetAddItemButton() {\r\n" (obviously minus the double-quotes).
I realize I should probably add one more action that is going on here that will very possibly could change things a bit...
The lines of code being generated (such as the one above for the Javascript function) are being written to a SQL Server database table/records during the generation process using sequence numbers that put the generated code into the appropriate sequence upon retrieval (by sorting these generated sequence numbers, 3 columns). When retrieved at the end of the generation process, the database records are read back in using POCO classes, and the code values are written to the appropriate .aspx and .aspx.cs source code files. My apologies for having left this out prior.
Any thoughts?
Lynn
I'm developing a small web app using ASP.net/VB.net4 that contains an important form on one of the pages. I need to make sure that the form is filled out correctly, and have decided to go with custom logic to do this, writing each check by hand and checking every element on the page.
My question is actually more fundamental here -- I have the checks written to make sure that the form passes correctness, but I don't actually know in what programmatical structure to put these checks.
For now, I put the checks in an infinite loop in my Visual Basic code behind.
While (True)
If (...) Then
MsgBox("One or more of your phone numbers is improperly formatted. You will be given 20 seconds to correct this mistake. If the mistake is not corrected in 20 seconds, you will be eliminated. Good luck.")
ElseIf (...) Then
...............
Else
Exit While
End If
End While
Upon hitting the submit button, the loop activates and the checks are completed -- however, there is an issue with this method. When the form is not correct, then my alert message continues to pop up infinitely and does not allow the user to exit out. If anyone knows how to avoid this, that would be an appreciated place to start. Furthermore, the default alert box for VB.net is just ugly and unprofessional, I would prefer something in-browser if possible, rather than just an ugly Windows alert message box.
I've seen a lot of sites now going with a dynamic check; that is, as you fill out the form, if at any point your entry is not formatted properly or is incorrect, you get an automatic alert that tells you this and perhaps the text box color changes to red. I would like to do it this way, if possible, since this seems easier for the user. However, I do not know how to do this and have had trouble finding information online about how to implement this. I believe this is an example of AJAX/jQuery usage but it has been a while since I've used them.
This is a painfully common thing to have to do, forms logic that is. I know there are a million and a half ways to do this, but does anyone have any advice or recommendation on how to implement this? Should I be trying to use vb.net (code behind), javascript, or some other way?
I have an VB ASP.NET (.aspx) file that has deeply nested logic and I'm getting lots of build errors like "If must end with a matching End If" and "Do must end with a matching Loop". How do I begin to debug this beast to at least get it to build?
The simple answer is to remove a large nested section and if it passes add a bit more until it fails. That's how I approach a problem like this.
Debugging starts after you get it to compile. Really effed code that won't compile you sometimes have to comment out blocks of code fix whats left and uncomment. Also if it just went haywire all of a sudden check for quote issues as a missed quote and break the whole file.
I have found that Visual Studio will generate the correct ending statements, so you have probably deleted a line by mistake, or commented one out.
As a rule, I try to avoid deeply nested statements. Can you refactor? A sequence of IF / ELSE IF / ELSE IF / ELSE / END IF construction is easier for the human eyes and mind to parse. Maybe even temporarily take some deep logic and make a temporary function. Remember, someone will have to maintain your code - and even if that someone is you, in 12 months time, complex structures are almost intelligible.
I have a web app that prints reports, most are just one page, or two, so I just create a component that shows the data and print it.
But I have this one report that can have thousands of lines, with a custom format, Flash will slow down with this.
Is it posible to print it without showing the actual data on screen? or is there a component to print reports with custom format?
thanks
I guess i'll answer my own question saying that the best way to create reports is generating a pdf file on server.
Check out my print preview example that you can print as many pages as you need. check it out http://blog.kreatx.com/2011/11/11/flex-printing-print-preview-pdf-generation/
See code below, for some reason it only works when I put a breakpoint on line 2 (*) is there some delay? Is it starting the next line before it finishes the 2nd one?
dp.SSLCertStoreType = nsoftware.IBizPayPal.DirectpaymentSSLCertStoreTypes.sstPEMKey
*dp.SSLCertStore = My.Computer.FileSystem.ReadAllText(Server.MapPath("\cert_key_pem.txt"))
dp.SSLCertSubject = "*"
Note: The error is thrown on the 3rd line only when the breakpoint is set on the 2nd line, after releasing the break the program executes my paypal purchase via credit card.
I will post the error again I am replicating it now...
System error: Could not acquire security credentials: error 8009030E.
There it is, while it should say "Order Confirmed!" type message if working correctly.
Almost certainly a threading issue, but nobody is going to be able to answer definitively unless they're familiar with nsoftware.IBizPayPal
Sometimes you can find that breaking can mutate an object's state, due to the locals window evaluating object properties. If they have a side-effect, then all bets are off, unfortunately :( No idea whether this is happening in your case.
I have no knowledge of ASP, so just wondering aloud: Could this be due to multithreading? You know when you put a break point you sort of freeze execution of all threads, but not so in the real execution.