|
am using windows XP as a development enviroment my web site is published usig IIS
i have 3 pages
Default , Login , Adduser
my authentication is "Forms"
my DB is saved in an XML File existing in the project folder which is c:\inetbub\wwwroot\MyApp
in the login form i check the user name if it is admin and it has the right password i use
"Server.transfer("Adduser.aspx")" to go to the addu user page
the page is displayed well but the main active code in this page targets to edit the xml file
while this code is initiated a windows login form appears again and i gave it all the avaialble users found on my machine but i could not pass it so i cant add or edit any new user.
by the way while my application was file based this problem was not existing
also the anonymous authintication is allowed and windows authentication too
Please some one help me with this error
thnaks
|
|
|
|
|
I have a asp page who return a set of data from sql server 2008 and it work fine on a lot of machines.
But in some one machines the records are returned only partially (with the same query??)
Sam body have an idea on this problem?
|
|
|
|
|
Probably more suitable for the asp.net board.
When you view the source of the rendered html page does is it complete, i.e. does it end with ?
|
|
|
|
|
Do I need to download any smtp server or do I simply just specify it in my C# code?
ML Lingwati
|
|
|
|
|
You need to specify it in you C# code, but you usually either have to download or install one to be able to use it. If you already have one, and have permissions to it, all you need to do it specify it.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
You point your message to your email server. For example:
using System.Net.Mail;
class Emailer
{
private void SendEmail()
{
MailMessage theMessage = new MailMessage();
MailAddress whoTo = new MailAddress("John.Doe@abc.com", "John Doe");
MailAddress whoFrom = new MailAddress("Sue.Smith@123.com", "Sue Smith");
theMessage.To.Add(whoTo);
theMessage.From = whoFrom;
theMessage.Subject = "Real Important Message";
theMessage.Priority = MailPriority.Normal;
theMessage.Body = "This is a real important email message.";
theMessage.IsBodyHtml = true;
SmtpClient client = new SmtpClient();
client.Host = "mail.123.com";
client.Send(theMessage);
}
}
Regards,
Gary
|
|
|
|
|
I want to open a child pop-up window from the parent window but i want cursor remain in the parent window e.g if there is a textbox for name and cursor is placed in this and after sometime a pop-up opens then the cursor should remain in the text area.
Any suggestion............
Do good and have good.
|
|
|
|
|
If you're using a classic popup window which opens a new instance of the browser you won't be able to do much about it because the window loses focus. If you're using a DHTML popup you shouldn't have to do anything.
|
|
|
|
|
Hello,
How can i export "Installed Updates"(vista) list to text file.
I tried with win32_quickfixengineering class and windows update history.
but the problem is, "description" property of above two class is not matching with "Installed Updates" result.
I need to export the list to text file exactly the "Installed Updates" shows.
I am attaching the code also(which i tried)
-----------------------------------------------------------------
using quick fix engineering
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_QuickFixEngineering",,48)
Set objFSO = CreateObject("Scripting.FileSystemObject")
if objFSO.FileExists(outputPath & "PrgList.txt") then
objFSO.DeleteFile outputPath & "PrgList.txt",True
end if
Set filePrgList = objFSO.CreateTextFile(outputPath & "PrgList.txt", True)
For Each objItem in colItems
filePrgList.WriteLine("Caption: " & objItem.Description)
Next
filePrgList.close
Set filePrgList = nothing
Set objFSO = nothing
-----------------------------------------------------------------------
Using Update History
Set objSession = CreateObject("Microsoft.Update.Session")
Set objSearcher = objSession.CreateUpdateSearcher
intHistoryCount = objSearcher.GetTotalHistoryCount
Set colHistory = objSearcher.QueryHistory(1, intHistoryCount)
For Each objEntry in colHistory
Wscript.Echo "Description: " & objEntry.Description
Next
|
|
|
|
|
not VBscript but
try wmic (a built-in MS app )
start --> run --> cmd (with CTRL+SHIFT+ENTER = admin right!)
wmic:root\cli>QFE get
output to file using
wmic:root\cli>/output:C:\InstallList.txt QFE get
Also have u tried looking in the registry for list of installed app, or alternatively the uninstall listing
|
|
|
|
|
Hi all,
I have a dynamic menu in asp.net that its BackGround is an colory image that convert dark blue to light blue, but if my menu be longer, this image be repeat more and more...
Now how I can convert one color to another color with java script to height of menu? for example dark blue to light blue.
Thank You
Hoda
|
|
|
|
|
Don't use images, use background-color if possible. Otherwise it depends on your structure. Is the menu one element or is it made up of many elements? Are they table cells, divs, spans??? Could you set the dark blue image as 100% to cover the entire menu then position light blue element where necessary? A lot of ways to skin the cat.
only two letters away from being an asset
|
|
|
|
|
|
Hi all,
I have a gridview on my form with 5 columns. One of the field contains item name along with an small icon image. On mouseover of that image i have to show the specification of that item. The specification is in a hidden column of the gridview. For this i wrote the following code:
Dim specimg As System.Web.UI.WebControls.Image = CType(e.Row.FindControl("Item_Spec"), System.Web.UI.WebControls.Image)
specimg.Attributes.Add("onmouseover", "Show_ToolTip(event,'" + HttpUtility.HtmlDecode(msg.Replace("'", "\'")) + "')")
Javascript:
function Show_ToolTip(e,myString)
{
var regX = /\\n/g;
var replaceString = '<br> \\n';
myString=myString.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
myString=myString==""? "No Specification": myString;
text= myString.replace(regX, replaceString)
document.getElementById("Tip_Label").innerText=text;
x = event.clientX + document.body.scrollLeft;
y = event.clientY + document.body.scrollTop ;
document.getElementById("Tool_Tip").style.display="block";
document.getElementById("Tool_Tip").style.left = x;
document.getElementById("Tool_Tip").style.top = y;
}
HTML:
<div id="Tool_Tip" style="position: absolute; z-index: 130" class="tip">
<label id="Tip_Label">
</label>
</div>
But when i hover over the image the tooltip doesn`t always appear below the image and some times appers very far away on the top of the page. What is it that i need to change so that my tooltip always appears just below the image ???
When you fail to plan, you are planning to fail.
|
|
|
|
|
Hi..
I am using Asp.net with c# in my project and want to generate MS word 2003 document dynamically.
And want to insert some text in the Header of newly generated word document.
Can anybody tell me how to execute this task from my webform.
thanks..
Hemant
By:
Hemant Thaker
|
|
|
|
|
You'll need to use Office Interop in your server side code.
only two letters away from being an asset
|
|
|
|
|
i am getting following error
Unable to cast COM object of type 'Microsoft.Office.Interop.Word.ApplicationClass' to interface type 'Microsoft.Office.Interop.Word._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00020970-0000-0000-C000-000000000046}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
Please help me out
Hemant
By:
Hemant Thaker
|
|
|
|
|
Have you verified all the assemblies are in place and are the correct versions?
only two letters away from being an asset
|
|
|
|
|
And you need the office app installed as well don't you? I mean the assemblies are dependent on the actual COM interfaces right?
|
|
|
|
|
Hi...thanks for your support
See this is my code..
///////////////////
using Microsoft.Office.Interop.Word ;
ApplicationClass oWordApp = new ApplicationClass();
object fileName = "c:\\myfile.doc";
object missing = System.Reflection.Missing.Value;
Document oWordDoc = oWordApp.Documents.Add(ref missing,
ref missing, ref missing, ref missing);
oWordDoc.Activate();
oWordApp.Selection.TypeText("This is the text");
oWordApp.Selection.TypeParagraph();
oWordDoc.SaveAs(ref fileName, ref missing, ref missing, ref missing, ref missing,ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
oWordApp.Application.Quit(ref missing, ref missing, ref missing);
/////////////////////////////////
I am using MS Word 2003, I have added reference of COM --> Microsoft word object library 11.0
Please tell me if i go wrong with this code..
thanks
Hemant
By:
Hemant Thaker
|
|
|
|
|
As led mike has said, Word should be available on the system you are trying to run this code on
only two letters away from being an asset
|
|
|
|
|
Your code worked fine for me without modification. I added your code to an existing project in Visual Studio 2008. I added a COM reference to the Microsoft Word 11.0 Object Library and kept your using directive for the Microsoft.Office.Interop.Word namepsace. I then placed your code into the CreateWordDoc() method, within the WordDoc class. When I then called the method, It created the Word file without any error.
using Microsoft.Office.Interop.Word;
public class WordDoc
{
public void CreateWordDoc()
{
ApplicationClass oWordApp = new ApplicationClass();
object fileName = "c:\\myfile.doc";
object missing = System.Reflection.Missing.Value;
Document oWordDoc = oWordApp.Documents.Add(ref missing,
ref missing, ref missing, ref missing);
oWordDoc.Activate();
oWordApp.Selection.TypeText("This is the text");
oWordApp.Selection.TypeParagraph();
oWordDoc.SaveAs(ref fileName, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
oWordApp.Application.Quit(ref missing, ref missing, ref missing);
}
}
Regards,
Gary
modified on Sunday, June 21, 2009 2:45 PM
|
|
|
|
|
Sir...
thanks for ur cooperation but i am still getting this error if i run it in vs 2008
Unable to cast COM object of type 'Microsoft.Office.Interop.Word.ApplicationClass' to interface type 'Microsoft.Office.Interop.Word._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00020970-0000-0000-C000-000000000046}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
please guide me for this
thanks
Hemant
By:
Hemant Thaker
|
|
|
|
|
Hi..
Now i know how to create word document.
What i need to know is, how to create Header in particular word document and save it.
Please help me out of this
thanks
Hemant
By:
Hemant Thaker
|
|
|
|
|