|
Thank you for help. I saw your site ,how do u find execution time of your page ?? sounds intresting . Explain to me please if your like .
|
|
|
|
|
In your code behind file (or wherever you put code)....
private int startTime;<br />
<br />
protected void Page_Init(object sender, EventArgs e)<br />
{<br />
startTime = Environment.TickCount;<br />
}<br />
<br />
protected void Page_PreRender(object sender, EventArgs e)<br />
{<br />
int endTime = Environment.TickCount;<br />
<br />
double executionTimeInSeconds = (double)(endTime - startTime) / 1000.0;<br />
<br />
SomeLabelInYourPageSomewhere.Text = executionTimeInSeconds.ToString();<br />
}
Basically you start the timer early in the page event cycle (the Page_Init) and stop the timer late in the cycle (Page_PreRender) which captures the page execution time for almost everything in between (Page_Onload, Control Initialisation, Data bindind, Events from client side button presses etc.).
|
|
|
|
|
|
Hi All,
I don't know in which message board I've to rise this question.. Please help me..
I've Developed a Asp.net shopping cart web application with vb.net as code behind.. SQL server as Back end..
I am in need of delete the records of the particular table at every day midnight and i want to have the blank table in next morning..
Is it possible to do?? Please help me in this issue
Thanks in Advance
|
|
|
|
|
maybe u should look for triggers based on time
Best Regards
3ala2
|
|
|
|
|
The best option is to define a JOB in sql servere and schedual it accordingly.You will find plenty of articles through google to do so.
|
|
|
|
|
Hi and thanks for attending at my message.
In the project I'm currently working, users need to capture a lot of information in a site, so I thought I could build a Web Service to do this. I was thinking in make that the web service pass the controls that are need, because the information they're gonna be capturing it can be very diferent between one form and another, so I want to avoid codding a lot of diferents webforms.
I thought that I could build a Web Service that can command a page to show o not some of the controls on the site, so the user just got to select the form and presto! they got the all the controls they need to capture the information.
But then I remembered: I can only pass data through the web service. The curiosity is really big...does anyone knows a way to pass controls through web services? can anyone tell me of another way to show diferents kind of controls for capturing data besides show/hide panel? or even another approach to solve this kind of thing?
Any suggestions or advices will be great!!!
Thanks every body!!!
A Programmer is as many times Programmer as Lenguages knows
|
|
|
|
|
Hi,
If you are planning to have dynamic controls ,You will have some Algo in your mind to store this data as well.
If you'r clear with that then you will have to create the controls dynamically on the basis of controls collection returns from your webservice .Then once user inputs data and submits form you will have to read these controls back.
donno wether i am able to make myself clear.....
Regards
|
|
|
|
|
I was thinking in something just like you were saying, send a collection of controls and then get them back and iterate through them, but I don't think it's a good idea anymore, because of the codding I'll have to do for all the arrangement of controls.
Now I'm thinking to do something diferent, I like the idea of a web service that only recive a customized object, even when I still have some problems passing those thing of object to a web service. I've done some googling and I decide to work with multiview/view controls, it seams pretty easy.
So, now I'm asking for direction on doing that: pass a cutomize object to a web service.
If you payback knows something about that it'll be great!!
Thanks again.
The limits of my language are the limits of my mind
|
|
|
|
|
I want to send an email using asp.net .. the main problem is that i dont know which smtp i must use? i want to run this on the server. I am using the smtp.mail.yahoo.com but its not working.
The Code:
Dim objEmail As New MailMessage<br />
objEmail.To = "buyproductsmalta@yahoo.com"<br />
objEmail.From = txtEmail.Text<br />
objEmail.Subject = "Query: " & "From " & txtName.Text & " " & txtSurname.Text<br />
objEmail.Body = txtQuestions.Text<br />
objEmail.Priority = MailPriority.High<br />
SmtpMail.SmtpServer = "localhost"<br />
<br />
Try<br />
SmtpMail.Send(objEmail)<br />
lblSent.Visible = True<br />
lblSent.Text = "The query has been sent...."<br />
Catch exc As Exception<br />
lblSent.Visible = True<br />
lblSent.Text = "Not Sent .. Please try Again"<br />
End Try
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
Does you mail server (smtp.mail.yahoo.com) require authentication, eg. username and password? If so you'll need to set that, also could you provide the error message that the exception is throwing...
Catch exc As Exception
lblSent.Visible = True
lblSent.Text = "Exception was: " & exec.Message
End Try
|
|
|
|
|
The error is this: Could not access 'CDO.Message' object.
SmtpMail.SmtpServer = "smtp.mail.yahoo.com"<br />
<br />
Try<br />
SmtpMail.Send(objEmail)<br />
lblSent.Visible = True<br />
lblSent.Text = "The query has been sent...."<br />
Catch exc As Exception<br />
lblSent.Visible = True<br />
'lblSent.Text = "Not Sent .. Please try Again"<br />
lblSent.Text = exc.Message<br />
End Try
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
After some years without mayor problems, my Visual Studio 2003 began to crash every now and then when working on a ASP.NET-project. At the moment the intervals are keeping getting shorter (strange !).
By now after every couple of lines of code I do a save not knowing when the next crash is coming up. Sometimes switching from code to design-view is enough...
I get a error and VS 2003 quits and sometimes it just even vanishes without no message what so ever.
This situation isn't workable anymore.
I've done some reinstalls, but the problem stays.
Then I realised I installed IE7 Beta some months ago ! Could this be the problem ?
To uninstall IE7 could maybe solve the problem, but IE7 has major improvements over IE6, so I would like to keep it (as M$ will force us in a short while anyway
Could IE7 really be the source for my crashes and has someone of you out there had similar problems AND maybe workarounds?
Thx in advance.
-- modified at 18:50 Saturday 25th November, 2006
|
|
|
|
|
Perhaps... a beta is still a beta. You should install the final version of IE7 instead.
---
b { font-weight: normal; }
|
|
|
|
|
Pat Krimson wrote: I installed IE7 Beta some months ago !
Why are you still using IE7 Beta?
I have a colleague who's using IE7 with ASP.NET 2003 and he's not had problems of this sort. Mind you he was formerly using the Beta and had no problems either. I suspect your problem is caused by something else.
Pat Krimson wrote: as M$ will force us in a short while anyway
At a guess I would say it won't be long before any new MS products that interact with the web (which is virtually everything) will mandate IE7 as a prerequisite. Does Office 2007? If not, VS 2007 is bound to require IE7.
Kevin
|
|
|
|
|
I realise I still have Beta 3 on my system... Thought by now I would have the final version. Downloading it now, hope this helps.
Thx to U all...
|
|
|
|
|
hi there,
i want ur help guys on how can i read froma word 2003 document and save content to sql database table. Offcourse the word file is rearranged to hold data in a specific order to be abe to use the data correctly "I guess!"
thanks
|
|
|
|
|
Well I'm no expert in that, but it sounds like you just have to figure out how word o3 works...I mean Document Object Model must have some sort of an API to be able to read...just like we read from a text file in notepad.
If you don't go after what you want, you'll never have it.
If you don't ask, the answer is always no. If you don't step
forward, you're always in the same place. -Nora Roberts
|
|
|
|
|
I have a .ashx file that I would like to incorporate into my project, but I am having some issues with Visual Studio 2003. The file extension is not recognized by the IDE, so I cannot set it as the start page or view highlighted syntax.
Is there a way to get Visual Stuido 2003 to recognize .ashx files as valid C# source files?
Thank you.
|
|
|
|
|
ashx is a handler, it can't be set as the start page.
only two letters away from being an asset
|
|
|
|
|
Ok, thanks for the info, but how can I get DevStudio to recognize it so the syntax highlighting works?
|
|
|
|
|
hi all,
i want i m new to web world (ASP.NET), to search from site sites using goolge, i mean i m providing searching through goole.i had text field when user write text on text field and hit the search google button then that text will be search from the google and shown on seperate page.
Regards.
Tasleem Arif
|
|
|
|
|
Hullo Folks,
Am trying to develop a point of sale system for a mobile company.
The point of sale is of distribution of airtime to customers.
The Server is on a Linux box and has MySQL database(Airtime recharge numbers are stored here)
Am to develop a client application using C#, the POS is to work in such away that.
The distributor goes to the mobile company, pays say $3000,
So whenever he sells airtime on his account is reduced.
The client will communicate with the server over a GSM modem.
However whenever the Distributor requests for Air-time from the server,
The amount he gets will be cached; the amount cached is what he will sell until,
It goes to zero, then he will request more from the server…then cache it….
This will go on and on until his account at the server goes to Zero.
Look at it in this way, you have a bank account, you need say $500,get to the ATM, withdraw the $500,u will have the $500,but your account balance has been reduced by $500,
So you use that $500,till its over and when you need more, you go back to the ATM for more.
How the airtime will be distributed is in 2 ways.
· The point of sale printer will print the recharge number on a piece of paper
Say 123-674-627-63,which will be given to the customer.
· The distributor should be able to directly load the airtime onto the customer’s phone
Can I please have help on how I can go about this one?
Especially the communication over the GSM modem to the server, which is Linux box.
|
|
|
|
|
Hi:
Hello everyOne.
How can i change the default location(usually the first control in the form when view the page source) of _viewState hidden form field in the aspx page.
For eg when some one view the source of my aspx page, the _viewstate field should not show up at the top of the page (in the page source. it looks junk).
I hope u are uderstanding what i m trying to achieve.Its all for SEO perposes.
Any Ideas?
Thanks
Aamir
|
|
|
|
|
You can either turn the view state off for a particular control, or even for the entire page...however that's not adviceable as you won't be able to keep the state of your other controls around across post back.
Now if you turn it off for the page, then when you go do source -> view, you are not going to see the view state field there. I am not sure why would you be concerned with where the view state shows up in your source...I mean if you are concerned with the date that you are storing in there being displayed, well its base 64 encoded so a reader can't just read it. However it's not encrypted or anything and there are base 64 decoders out there that can simply decode it for you.
I hope this helps.
Sam
|
|
|
|