|
Hi every one
I used an image control on a web page.The image is shown in design time but not in runtime.The ImageUrl is "~/Images/bg.jpg".
I tried other formats like "./Images/bg.jpg" or "F:/myWebSite/Images/bg.jpg" but no success.
any idea?
thanks
|
|
|
|
|
Does your image folder contain web.config file?
|
|
|
|
|
No , there is no config file in "Images" folder.
|
|
|
|
|
Can you access the images by URL in a browser?
Adam Maras | Software Developer
Microsoft Certified Professional Developer
|
|
|
|
|
Yes ,I can access the image by url "f:\WebSite2\Images\bg.jpg " in browser.
|
|
|
|
|
Hello,
I need to know this one. How can we get printer status using JavaScript and also how can we give MS word document print command using JavaScript.
Thank you,
Gokul Rangarajan
|
|
|
|
|
http://msdn.microsoft.com/en-us/library/aa394363%28v=VS.85%29.aspx[^]
Refer this one
Sample code is
string printerName ="HP LaserJet M1522 MFP Series PCL 6 (Copy 1)"; // this is my printer name
memoPrintDetail.Clear(); //memoPrintDetail is richTextBox to show my complete printer status later on
memoPrintDetail.AppendText("Printer Name : " + printerName + "\n");
ManagementScope scope = new ManagementScope(@"\root\cimv2");
scope.Connect();
// Select All Printers from my computer
ManagementObjectSearcher searcher = new
ManagementObjectSearcher("SELECT * FROM Win32_Printer");
ManagementObjectCollection collection = searcher.Get();
string filename="text1.txt";
File.WriteAllText(filename,"");
//File.Create("text1.txt");
foreach (ManagementObject printer in collection)
{
//if (printer["Default"].ToString().ToLower().Equals("true"))
//{
// printerName = printer["Name"].ToString();
//}
//else
//{
// continue;
//}
if (printer["Name"].ToString() == printerName)
{
if (printer["WorkOffline"].ToString().ToLower().Equals("true")) // This code is working
{
memoPrintDetail.AppendText("Status : Offline\n");// This code is working
return;
}
else
{
memoPrintDetail.AppendText("Status : Online\n");// This code is working
}
//MessageBox.Show(printer["ExtendedDetectedErrorState"].ToString()); // Always show "0" value
// MessageBox.Show(printer["DetectedErrorState"].ToString()); // Always show "0" value
foreach (PropertyData pdata in printer.Properties)
{
File.AppendAllText(filename, "\r\nName: " + pdata.Name);
File.AppendAllText(filename, "\r\nValue: " + pdata.Value);
memoPrintDetail.AppendText("\nName" + pdata.Name);
memoPrintDetail.AppendText("\nValue" + pdata.Value);
}
}
}
Note::
----------
memoPrintDetail is a rich textbox
suriya
|
|
|
|
|
Hello,
This is Gokul Rangarajan. I need a suggestion or code in JavaScript which reads the MS Word document page settings and number of pages. I know how to open and read a MS Word document, but i couldn't able to get page properties. Some one please help me with this.
Thank you,
Gokul Rangarajan
|
|
|
|
|
Hello,
It Gokul again. I found the solution for my problem i've posted
var w=new ActiveXObject('Word.Application'); --creare MS word obj.
w.Documents.Open("C:\\ABSTRACT.doc"); -- open a doc..
obj=w.visible=false; --- set visible false
obj.Content; --- to get content in MS word doc..
w.ActiveDocument.ComputeStatistics(2); -- Get number of pages
w.ActiveDocument.ActiveWindow.Panes(1).Pages.Item(1).Width; -get width in pixels..
w.ActiveDocument.ActiveWindow.Panes(1).Pages.Item(1).Height; -get height in pixels..
w.ActiveDocument.PageSetup.TopMargin --get Margin top in pixels
w.ActiveDocument.PageSetup.LeftMargin --get Margin left in pixels
w.ActiveDocument.PageSetup.BottomMargin --get Margin bottom in pixels
w.ActiveDocument.PageSetup.RightMargin --get Margin right in pixels
w.ActiveDocument.PrintOut(); //Print given document
Note: 72 pixel = 1 inches.
Thank you,
Gokul Rangarajan
|
|
|
|
|
Dear friend,
I have hosted 3 web sites (WebSite1, WebSite2 ,WebSite3) on IIS6.0.
I want to kill process of website2 in c# while killing the process of Web Site 2 ,the other website like website1 and website3 should not be stopped .First of all I am very eager to know how to get process of specific website so that I can kill process individually.WebSite1 , WebSite2 and Website 3 is not in default website . These are created separately.
Please let me know how to kill process of specific website.
Regards
Rajesh
rajesh
|
|
|
|
|
Hi,
do you host every website in a different application pool? If yes, then you can kill a website by killing the process for the app-pool. I know there is a command-line tool to get the name of the process running a single application pool, so I guess this is also possible using WMI or something similar.
Regards
Sebastian
|
|
|
|
|
Hi
i am using vb script in my client side and i have to send a byte array from this client side to server side(may be iis).
at present i am just converting this byte array into string and send thro hidden field.
but i need to send the byte array directly(without any conversion).
hope i'll get quick reply.
thanks
regards
subramanian
|
|
|
|
|
I want to disable print screen on the webpage.
I have tried the option of Clearing the Clipboard after regular interval, issue with this is, it also clears the text data from clipboard
I want to disable only the print screen, whereas user can copy/paste the text data from other windows
|
|
|
|
|
I am writing a winform application that allows the user to define a range in a HTML document by selecting two anchor points: beginning and end. I'd like to graphically display the selected range by programattically inserting HTML into the in-memory version of the HTML, which should then render in my WebBrowser control. Ideally, I'd like to draw a box around the selected range, maybe with a nice colored background. Unfortunately, the beginning and ending anchor points may not reside in the same HTML block, and I'm not sure how to write the HTML to make a box span HTML blocks like that.
Clear as mud? Any thoughts or ideas would be appreciated.
Aaron
|
|
|
|
|
I'm working on making tables look nice in CSS, but I'm running into some difficulties:
If I do
td.TD2
{
padding:5px;
}
then I get a class for a single cell with the padding space that I want. However, applying the padding property to a tr class or a table class appears to do nothing.
Anyway, I'd rather not specify a new class for every single td on the page. Is there an elegant way to make the padding property work for an entire table?
|
|
|
|
|
table.T2 td
{
padding:5px;
}
Funny how I tend to figure out the answer to my own question the second after finally resorting to posting on the forum.
|
|
|
|
|
(edit: crap, it's in the web forum, wanted to put that in the lounge... possible to move it ?)
Howdy'
Dad wants to have his own presence on the web.
His main use will be to publish fiction and non-fiction texts, articles and stuff like that.
His main requirements are that the layout be as simple as possible (NOT myspace-ish) and that it should be as easy as possible to manage his "site";he also wants to have a domain registered to his name.
I'm pushing him towards blog engine like wordpress or typepad.
Comments ? suggestions ?
Thanks.
This signature was proudly tested on animals.
|
|
|
|
|
Blogspot is a good choice too. If you know html and css, you can change the design to your own.
|
|
|
|
|
Anyone telling you the "best" will be giving their opinion, there is no objective winner. I use blogger.com, but wordpress.com and livejournal.com are also popular.
|
|
|
|
|
Hi All,
I just want to know which is the best way to retract user of a web page from saving the images displayed in webpage.
The ways I know are
Disable rightclick save image using javascript
Using transparent image in from of the image.
Using flash.
Can anyone suggest the best method for this?
Thanks
|
|
|
|
|
If you want greatest security(of images ), use flash.
But if you want your site to be compatible as well, then choose 2nd way.
Using flash would be more secure, but not everybody's browser has flash installed.
Therefore I would choose 2nd way.
|
|
|
|
|
Well Yes - We can't expect to have flash on all machines.
Though even if I use second method, the images will be present in the temporary internet file folder.
Any thoughts??
|
|
|
|
|
That's the way the internet/browsers work.
You put a picture up on a web page then be prepared for the fact that every person that views your picture now has it stored on their own hard drive.
Don't want them to have it don't put it on the internet.
|
|
|
|
|
hi all
i'm new to web services
i've uploaded my web service files to a remote ftp
in the add web reference window when I try to select my file I get in the 'web service found at this URL'
the following message: 'Default credentials are not supported on an FTP request.
Parameter name: value '
what does it means?
what should I do?
Thanks
|
|
|
|
|
Hi All,
I have a requirement to submit a web page (A.aspx) after filling the details in its field,which need to be done by a Web bot kind of program which will be called when a button click is evoked in my page(B.aspx).
B.aspx page is my page which contains the same fields as there in A.aspx, except that the user won't see A.aspx. When i click the Submit button of B.aspx, the program should fill in the same details in A.aspx and evoke the Submit button click of A.aspx.
Please help me in doing this using C# asp.net 2.0 web application development
Thanks in advance
--
KC
|
|
|
|