|
|
how can I avoid the Microsoft XPS Document Writer from installed printers list
|
|
|
|
|
Stop asking the same things over and over. Refer to the answers you were given, and grow a brain. You cannot write code to control what printers show up in the print dialog in ASP.NET, and if you're showing a list of printers in your form somewhere, how hard can it be to remove it ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Use the following code to get all printers. Thus the dropdownlist contains list of installed printers. If am saving Microsoft XPS Document Writer as my printer and try to print using the printer a window is opened for saving the print document.But when I host the application and try to print with Microsoft XPS Document Writer the page shows a javascript error or the page become struct.I think it is because if am selecting Microsoft XPS Document Writer as printer its not a valid printer and shows the dialog window to save the document but after hosting save window is opened and the timeout occurs therefore the errors occurs.If am selecting a valid printer it works fine. Can you help me to avoid Microsoft XPS Document Writer from my installed printers lisrt or help any way
//Get all the Installed printers
foreach (String strPrinterName in PrinterSettings.InstalledPrinters)
{
ddlSetPrinter.Items.Add(strPrinterName);
}
|
|
|
|
|
banerjins wrote: //Get all the Installed printers
foreach (String strPrinterName in PrinterSettings.InstalledPrinters)
{
if (!strPrinterName.Contains("XPS"))
ddlSetPrinter.Items.Add(strPrinterName);
}
I assume you're running your site on a local network, the server is part of the local network, and so the user tells the server which printer to print on to, and because it's a local network, that printer is actually present where the user is ?
That you get a javascript error is odd. How are you starting the printing process ? What are you printing exactly ? If the server send a page to be printed, I don't see how that can change the javascript.
banerjins wrote: nd shows the dialog window to save the document but after hosting save window is opened and the timeout occurs therefore the errors occurs
If a dialog is shown on the client, that's probably part of the issue. Overall what you're doing, sounds messy and ill advised.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Hi ,
I have created simple web application in .net 2.0 C# . I have added this code
to add a favicon. This is working fine, if I inherit my page from "System.Web.UI.Page". but it is not working if I inherit from "System.Web.UI.MobileControls.MobilePage" .Please tell me the reason and resolution for this?
|
|
|
|
|
Rename the icon file to favicon.ico and put it in the root of your site, it should work automatically then.
|
|
|
|
|
I have 1 treeView for category & subcategory. It is filling by database.
I saved all checked nodes value of treeview control in table "AvailableSubCategory"
Now, I want to make a modification in data,
So that, I want to check only that subcategory Nodes of TreeView, that are in "AvailableSubCategory" table.
How can I do this?
|
|
|
|
|
kripa ostwal wrote: So that, I want to check only that subcategory Nodes of TreeView, that are in "AvailableSubCategory" table.
How can I do this?
How is this related to ASP.Net?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
your question was not clear...
|
|
|
|
|
Sir,
I want to ckeck some childnode from TreeView, which have category(nodes of treeview) and subCategories(nodes of category nodes) information.
When user click on btnModify, I want to show all details on page from database (whatever subCategories he selected at save time)
In database I stored values of checked subCategories(at the time of Save record. For that I Used following code to get selected Nodes values
For intCnt = 0 To TreeView1.CheckedNodes.Count - 1
arrSubCat(intCnt) = (TreeView1.CheckedNodes(intCnt).Value)
Next
Then I stored that onebyone in database
At the time of modification, I retrive that subCategory values in object of datatable.
Now I want to show checkmarks for those subCategories nodes, where values will match.
For that i wrote,
If objDT.Rows.Count > 0 Then
For intCnt = 0 To objDT.Rows.Count - 1
TreeView1.FindNode(objDT.Rows(intCnt).Item
(0).ToString).Checked = True
Next
End If
But It gives error s Index Out of bound
|
|
|
|
|
How to change AJAX control values dynamically in asp.net2.0
|
|
|
|
|
rjayaabharathi@gmail.com wrote: AJAX control
For which AJAX control are you talking about?
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Within Update PRogress control ,i'm having one label....
now i want to change label width....
|
|
|
|
|
So, what's the issue ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
if i'm changing that label values dynamically,showing error as label1 is not declared
|
|
|
|
|
rjayaabharathi@gmail.com wrote: f i'm changing that label values dynamically,showing error as label1 is not declared
So as per the error says, you didn't define the Label
|
|
|
|
|
if u r placing label inside update progress ,it will show that error
|
|
|
|
|
Hi All,
I already developed the website. I m using Semi dedicated server where my website is hosted. we are into sms service. We are using third party link which is integrated in our application to send the sms.
I also used threading concept for fast execution.
But my application pool crashes after some time and then it will show the service unavailable error. The hosted company given following error
EventType clr20r3, P1 w3wp.exe, P2 6.0.3790.3959, P3 45d6968e, P4 mscorlib, P5 2.0.0.0, P6 471ebc5b, P7 25e, P8 f, P9 system.formatexception, P10 NIL
what is the solution for that?
Thanks
SJS
|
|
|
|
|
A scarry one.
I got something similiar when i was printing pdf-s from asp.net, service i used did not have enough permissions, and got similiar when there ware thread problems. But, "system.formatexception" could mean that you send wrong data type. How do you call this service? Got any code to see what you exactly doing?
Try without multiple threads for start. But i would say you call some method with wrong data type parameters.
|
|
|
|
|
Ok Thanks I will try to check it
|
|
|
|
|
Hi,
i Have a problem with showing the image.After uploding new image also,it show the old image.when i refresh then it display the new image.what should i do to display image after uploding it.
plz help me
thank you
|
|
|
|
|
There is very simple solution for this.
Make something like this
Now, if you add query string to image with time, it will show picture ok, since this image name does not exist in cache of browser.
Edit:
Don't worry, query string on image will not break anything. Image will show, no matter if you put it like "image.jpg" or "image.jpg?something".
There are more ways to handle this, set expire header to image in past, this will also force browser to read image from server and not local cache.
|
|
|
|
|
You got my 5
P.S. Pershendetje
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
actualy i need code to solve my problem.it may be cache problem.But i m not able to solve that.
plz help me
|
|
|
|