|
This person always posts silly questions.
He needs to learn how asp.net works.
|
|
|
|
|
Session will be created on web server where you have hosted your application
cheers,
Abhijit
|
|
|
|
|
Hi i am sending mail to different ids...,
Everything going on well....,
I am going to make this application to exe and put it in schedular task...,
This things will execute automatically...,
Now my probs is suppose mailserver is down...,
Then it will be probs in mailsend...,
So in that case how to handle the code it mean if the mailserver will down or mail didnt send properly...,
Then it have to be fire again after some minutes or some other condition have to do how to do that?
This is my code:
DirectoryInfo dInfo = new DirectoryInfo(mypath);
DirectoryInfo[] dInfos = dInfo.GetDirectories();
foreach (DirectoryInfo d in dInfos)
{
MailMessage mailMessage = new MailMessage();
MailAttachment attach = null;
mailMessage.From = "Magesh@Test.com";
mailMessage.To = d.Name;
mailMessage.Subject = "Hi";
//mailMessage.Body = "Hi This One Is For Testing
FileInfo[] fInfos = d.GetFiles();
foreach (FileInfo f in fInfos)
{
attach = new MailAttachment(f.FullName);
mailMessage.Attachments.Add(attach);
}
SmtpMail.Send(mailMessage);
mailMessage.To = "";
attach = null;
}
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
You may use Ping command to check if the mail server is down or not.
Then, depending upon the outcome, you can decide what to do.
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
iam having nearly 45000 records in the data base where iam getting these many records into the grid view using the select statement in the oracle query .the problem it is more time consuming .is there is any aleternate solution to get these many or more than these record as fast as possible
|
|
|
|
|
Enable Pagination for the GridView. This would improve the performance of data loading
|
|
|
|
|
hi mr rider to implement this also the data should come fast na .my problem is the data is not getting faster from the data base.
|
|
|
|
|
You can enable pagination in your store procedure instead of code behind side.
Suppose if you want to set PageSize=20,retrive only 20 records from database in one query and get total number of records in other query.
There are many articles availabel.search in google for this.
another way is that, retrive all records when page is loaded,store dataset in cockie and bind gridview and enable pagging.
when page index changed,get back dataset from cockie and bind gridview.No need to retrive records from database again.
please don't forget to vote on the post that helped you.
|
|
|
|
|
hi sir the concept whic u are saying is quite intersting...plz help in this regrds by giving the best site abt paging in the database
|
|
|
|
|
lakshmichawala wrote: hi sir the concept whic u are saying is quite intersting...plz help in this regrds by giving the best site abt paging in the database
Read these two article.
Article 1
Article 2[^]
please don't forget to vote on the post that helped you.
|
|
|
|
|
Imran Khan Pathan wrote: another way is that, retrive all records when page is loaded,store dataset in cockie
Are you kidding ? a dataset which contains 45000 records and keeping it in cookie ! I don't think it is possible.
|
|
|
|
|
R u used Stored Procedure.
if not u might be use StroredProcedure , the command is still same but the stored procedure execute faster then simple command
i hope this will help u....
|
|
|
|
|
Hi
U c try to pageing the data in database it self.
Tanks
Siva
|
|
|
|
|
Hi,
I am using following code to generate report. I am using template for report header.It works fine. I want report should generate on individual sheet for each office. Currently Data of all sheet display on single sheet.
How i will add sheet dynamically for each office.
Private Sub CreateConsolidatedXLSheet(ByVal RptDate As String, ByVal endtime As String, ByVal conDate As String, ByRef ConsRptDS As DataSet)
Dim rpttype As String = "SummaryRpt"
Response.ClearContent()
'Response.AddHeader("Content-Disposition", "attachment; filename=" + FileName + ".xls")
Response.AddHeader("Content-Disposition", "attachment; filename=" + FileName + ".xls")
Response.ContentType = "application/vnd.ms-excel"
Dim headerfile As String = Server.MapPath("Reports\Header_" + rpttype + ".html")
Dim hreader As System.IO.StreamReader = New System.IO.StreamReader(headerfile)
Dim headerdata As String = hreader.ReadToEnd()
hreader.Close()
Dim username As String = TTUser.GetDisplayNameFromDB(context.User.Identity.Name)
headerdata = headerdata.Replace("##curdate##", Format(CDate(RptDate), "MMMM-dd,yyyy"))
Response.Write(headerdata)
Dim drow As DataRow
Dim dcolum As DataColumn
Dim numcols As New ArrayList()
Dim slno As Int16 = 1
Dim LRow As String = ConsRptDS.Tables(0).Rows.Count.ToString
For Each drow In ConsRptDS.Tables(0).Rows
Response.Write("<tr>")
Dim colix As Int16
For colix = 0 To drow.ItemArray.Length - 1
Dim strnum As String = ""
If colix = 0 Then
Response.Write("<td x:str>")
Response.Write(drow(colix)) 'tz.GetPST(drow(colix)))
Response.Write("</td>")
Else
Response.Write("<td x:num >")
Response.Write(drow(colix))
Response.Write("</td>")
End If
Next
Next
Response.End()
End Sub
Binod K.
(Miles to go before I sleep)
|
|
|
|
|
This is the sample to create differenct sheets in same excel sheet
try this
Microsoft.Office.Interop.Excel.Application _excel;
Microsoft.Office.Interop.Excel._Workbook _wrkBk;
Microsoft.Office.Interop.Excel._Worksheet _excelSheet;
Microsoft.Office.Interop.Excel.Range _oRng;
//create an object og Excel Application.
_excel = new Microsoft.Office.Interop.Excel.Application();
_excel.Visible = false;
//Get a new workbook.
_wrkBk = (Microsoft.Office.Interop.Excel._Workbook)(_excel.Workbooks.Add(Missing.Value));
_excelSheet = (Microsoft.Office.Interop.Excel._Worksheet)_wrkBk.ActiveSheet;
Microsoft.Office.Interop.Excel._Worksheet _tempSheet = (Microsoft.Office.Interop.Excel.Worksheet)_wrkBk.Worksheets["Sheet1"];
int _defaultSheetCount = _wrkBk.Worksheets.Count;
for (int j = 0; j < dt.Rows.Count; j++)
{
if ((j + 1) <= _defaultSheetCount)
{
_excelSheet = (Microsoft.Office.Interop.Excel.Worksheet)_wrkBk.Worksheets["Sheet" + (j + 1)];
}
else
{
_excelSheet = (Microsoft.Office.Interop.Excel._Worksheet)_wrkBk.Sheets.Add(Type.Missing, _tempSheet, Type.Missing, Type.Missing);
}
_tempSheet = _excelSheet;
//write the data in the predefined format to the Excel Sheet.
_excelSheet.Cells[1, 3] = "test";
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
Hi,
how to divide each row of table in 48 cells Dynamically ?
Give me hint or example related to use of table.
thanks in advance
Rameez
|
|
|
|
|
rameez Raja wrote: how to divide each row of table in 48 cells Dynamically ?
Give me hint or example related to use of table.
Example
Table tbl=new Table();
TableRow tr=new TableRow();
TableCell tc;
for(int i=0;i<48;i++)
{
tc=new TableCell();
tc.Text=i.ToString() + "Number Of Cell";
tr.Cells.Add(tc);
}
tbl.Rows.Add(tr);
Take one PlaceHolder on the Page and Add this table
PlaceHolder1.Controls.Add(tbl);
Regard
Khan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Yesterday I installed .NET Blog Engine on my ISP web server.
It works pretty well and now I have 2 blog.
The only problem I noticed, if I don't connect to the web site for a couple of hours and try to access the web site again, there is a waiting period of about 10 seconds when I try to access it for the first time (in the new timeframe).
Is there anyway to speed up this startup time?
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
Super Lloyd wrote: if I don't connect to the web site for a couple of hours and try to access the web site again, there is a waiting period of about 10 seconds when I try to access it for the first time (in the new timeframe).
Blog engine will be doing caching and might have set very less cache timeouts. When you request after some hours, it might be reloading data to the cache.
Small delay in page load may happen when you request after an application restarts. So make sure application is not recycling frequently.
|
|
|
|
|
What do you mean by recyclicng frequently?
Well it's all good and fast, it is only after a few hours without use that I have this performance hit, it looks more like a dismissed cache after a while, as well as a recompilation of the app as well perhaps...
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
Super Lloyd wrote: a recompilation of the app as well perhaps...
I meant this.
AFAIK, when application recompiles, it leaves an entry in the event viewer. Check that if it is happening frequently.
|
|
|
|
|
I'm a total beginner, and I'm building a web app with VB.
I have a database in SQL 2005 and my application is trying to find a business.
The user enters a string in the textbox and with that string build a query to get the desired results.
For phone numbers it should be easier, with the exact phone number find the exact match and display.
But for business name it's a little more complicated.
How do I go about in doing that? Any help is appreciated.
|
|
|
|
|
I have created a SQLDataSource that connects to the database and retrieves the correct information I need.
But I want to be able to invoke the results in a ListView only when the user clicks the button.
Any help appreciated. Total beginner!
modified on Thursday, July 24, 2008 11:41 AM
|
|
|
|
|
I'm creating a search page that displays record summaries from multiple tables and has a link to the full records in the page for the table they're from. As a result I can't define the DataNavigateUrlFields and DataNavigateUrlFormatString fields at design time.
Is there a way to edit them from the .cs file that I'm not finding, or do I need to do something else to create the hyperlink column?
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
this is rashmi, asp.net developer ..
we are developing website name: www.discareuropa.com this has to develop in 2 language English & Español
we have converted english to Español..through google translator and html pages are working fine..
Problem:-
if we use server side control..then we are getting problem
1st Translator language from English to Español, you will notice every thing change to Español....then put user name: admin password: admin (left side)
and page will redirected to lighterBrand.aspx ..and page is auto refreshing and converting into Espanol, (as we want) ..but auto refreshing it is not stoping, ..so kindly help me how can i stop this...
thanks/rashmi
|
|
|
|