|
sritha wrote: object reference is not set to an instance of an object
Did you debug your code? Where are you getting the error ? Does that object initialize?
|
|
|
|
|
Hi There,
I am working on ERP products using Asp.Net 2.0 and I am going to switch on 3.5 I know
basic queries of linq.But I want to know weather it is possible to write complex queries which inclueds caculation or large amount of data manupulation using linq.
Thanks.
|
|
|
|
|
There is a seperate forum on LINQ[^]
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.
|
|
|
|
|
Hi All,
I need to create pdf file using iTextSharp. I can write simple text in my pdf file. But How can I add html content in pdf file.
I used string variable to hold html content. But when I use that variable my pdf file content not showing html format.
my Code given below :
private void createPDF()
{
//string newFile = @"N:\.NET\New Document.pdf";
string strContent = "";
StringWriter sw = new StringWriter();
string newFile = Server.MapPath("1.pdf");
Document doc = new Document();
PdfWriter writer = PdfWriter.GetInstance(doc, new FileStream(newFile, FileMode.Create));
// Metadata
doc.AddCreator("PDF Printer by Joachim Tesznar");
doc.AddTitle("New PDF Document");
// Add content
doc.Open();
sw.Write(GetMailBodyOrderDetails().ToString());
doc.Add(new Paragraph(sw.ToString()));
doc.Close();
}
#region string GetMailBodyOrderDetails()
public string GetMailBodyOrderDetails()
{
StreamReader StmRdr1 = null;
FileInfo fi1 = null;
string strFileName1 = Request.PhysicalApplicationPath + "Registration.html";
fi1 = new FileInfo(strFileName1);
if (fi1.Exists)
{
StmRdr1 = File.OpenText(strFileName1);
StreamReaderStrLine1 = StmRdr1.ReadToEnd();
// StreamReaderStrLine1 = StreamReaderStrLine1.Replace("<TITLE>", ListingName).Replace("<PRICE>", Price.ToString()).Replace("<DESCRIPTION>", ListingDetail).Replace("<EMAIL>", Email).Replace("<COUNTRY>", Country).Replace("<STATE>", State).Replace("<SUBURB>", City).Replace("<TOPADS>", "No");
StreamReaderStrLine1 = StreamReaderStrLine1.Replace("\r\n", "");
StreamReaderStrLine1 = StreamReaderStrLine1.Replace("<!--body", ".body").Replace("}-->", "}").Replace("\t", "");
}
return StreamReaderStrLine1;
}
#endregion
please reply
Thanks
Raj
|
|
|
|
|
Hi to all,
How to read UNREAD mails from mail server through .netcode???
|
|
|
|
|
Is your application going to read emails from Exchange Server?
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
s I reading mails from exchange server.
|
|
|
|
|
|
nkmkrishna wrote: s I reading mails from exchange server.
Which Exchange Server are you using ? If you are using Exchange Server 2007, Microsoft provided a web Services for that (Exchange Web Services [ EWS ] ), using that you can read mail from Exchange server.
Here is some excellent article in Code project by Brij,
Check the Exchange Server Section
|
|
|
|
|
I have a quick question regarding my project. I have looked for the information on the web, but was not able to find relevant information.
We are getting Source data from two of our client in the form of Excel Sheet. These Excel sheets
Are generated using reporting services. On examining the excel sheet, I found out that the name Of the columns contain data itself, so the names are not static such as Jan 2007 Sales, Feb 2007 Sales etc etc.
And even the number of columns are not static. It depends upon the range of date selected by the user.
I wanted to know, if there is a way to import Excel sheet using Integration Services by defining the position Of column, instead of column name and I am not sure if there is a way for me to import excel with dynamic Number of columns.
Your help in this respect is highly appreciated!
Thanks,
Praveen Kumar.R
|
|
|
|
|
i want to refresh my page automatically after 5 sec.
im using java script
its working fine
but i want that this autorefreshing stops after some given time
how to do that ?
is it possible?
help me.
its urgent.
|
|
|
|
|
Use javascript setTimeout not setInterval. setTimeout will cause the page to be refreshed only once.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
use cleartimeout() function.
|
|
|
|
|
hi
thanks for reply
can u please tell me how can i do postback after i use the cleartimeout()
|
|
|
|
|
I don't understand your question.
cleartimeout() is javascript function which will clear your refreshing function if you want to set timer again use settimeout().
If you just want to postback your page with javascript then use, __doPostBack() function.
|
|
|
|
|
naveen attri wrote: how to do that ?
is it possible?
help me.
its urgent.
Ah, the calling card of the moron. Help me, it's urgent. Google broken where you live ?
The answer is pretty common sense. You remove the script that does the auto refresh after a given number of times.
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
|
|
|
|
|
did you try this ?
<!--The next line of code will refresh the page every 5 minutes-->
<meta http-equiv="refresh" content="300">
|
|
|
|
|
hi all,
how to show confirm alert message when the user closes the browser tab in asp.net using javascript...
Ashok
|
|
|
|
|
|
var displayPrompt=true;
if (displayPrompt){
event.returnValue = "are you sure to close?";
}
|
|
|
|
|
hi all,
how to show confirm alert message when the user closes the browser tab in asp.net using javascript...
Ashok
|
|
|
|
|
ASP.NET has nothing to do with it. There is a closing event on a form you can hook into in js, as someone else said ( so, why did you ask twice ? )
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 Guys,
Anybody knows of a good implementation in ASP.NET using C# where you have 2 list boxes and you want to move items between them.
Records will be coming to first list box from database.
Like…
[Available Items] << < > [Select Items]
If not going to use AJAX.
Thanks
|
|
|
|
|
There's tons of examples for this on the web. IT's not an ASP.NET problem, unless you want to do a postback every time. Otherwise, it's a javascript problem.
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
|
|
|
|
|
Have you tried it by yourself or have you googled for this? I think you might have got lot of answers regarding this if you have tried. By the way, you can try like the following:
ListBox2.Items.Add(ListBox1.SelectedItem);
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|