|
the general format is DateDiff("S", OneTime, OtherTime)
more info at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vafctdatediff.asp
|
|
|
|
|
I want to know exactly what is IspostBack() in vb.net?
When we have to use this?
Why we have to use this?
|
|
|
|
|
IsPOstback is part of ASP.NET. When you first load a page, it's not a postback. When your page is manipulated in such a way that the page is reloaded, so another instance of this class is generated and run, viewstate is loaded, and the page responds to some event, basically, it's a postback. The obvious reason to use this is that if you have a drop down list on the page, the first time your page loads, you need to populate it. After this, if you were to populate it again, you would lose the selected item, and you don't need to, as the contents are already loaded and stored in viewstate. The same holds true for other databound controls, and databound controls would be the major reason to check for postback, if only to save database resources.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Ok now I am geting the clear picture of IsPOstback() function. To be more confident I will just summerize what I have understtod from ur response.
1. If I am displaying list screen then no need to call the bind function inside IsPostBack() function.
2. If I anywhere needs viewstate then it should be called or binded inside IsPostBack() function
|
|
|
|
|
IsPostBack is a property of the WebForm, not a function. It is used to determine whether the page is being loaded in response to a client postback, or if it is being loaded and accessed for the first time.
<br />
If IsPostBack() Then<br />
'Page is being loaded in response to a client postback<br />
Else<br />
'Page is being loaded and accessed for the first time<br />
End If<br />
Hope this helps
Tom
|
|
|
|
|
|
How do I open a folder from a varilable string "c:\Temp".
Sounds simple but I hit a wall (Or need more coffee... )
Want a Button click to open a predifined folder.
Thanks
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
Open it how ? As in an explorer view of the folder ? Process.Start from memory ( whatever the equivelant of shellexecute is ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Open in Explorer view...
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
Thanks used the Process.start worked great..
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
Hi
I have a VB.Net application using oracle 8i as backend on win2000, it is working fine on desktop but when we run it on laptop its giving the following problem
the values in the hashtables used in the application are gettin truncated while retrieving...same code works well on the desktop.
if nyone has some solution plz help
Rahul
|
|
|
|
|
There could be many reasons why it won't work on the laptop. The first one being the differences in the O/S installation between the desktop and laptop (are they the SAME O/S version, patch level, etc etc???) Try running it on a different laptop, reinstall all supporting software etc.
...Steve
|
|
|
|
|
well steve i have checked it all ...and the OS verison and other patches are already installed.....well i have tried it on 2 laptops...but the same problem of truncation of values in the hashtable object of VB.Net is there.
|
|
|
|
|
OK,
Are you saying that
1) The application works fine on a desktop to which it has been deployed?
or
2) The application works fine on the desktop on which it was developed?
If the answer is numer 2, the problem may have nothing to do with the laptop versus desktop. Try the deployment on a clean desktop - i.e. no dev tools. I have a feeling it will not work on that desktop either.
Sounds suspiciously like a setup problem, not a "desktop vs laptop" problem.
|
|
|
|
|
I does not sound suspicous at all.
I have found many reasons why this could be.
Newer laptops, do not include all .NET framework dll's.
Worse over, they will not allow them to be installed!
This makes no sense, and essentially makes Microsoft a liar!
The documentation never said this would be, in fact the opposite.
I would not have changed to NET, had I known this.
This is the type of thing, that keeps terrorism alive and well.
I found this out recently, but unfortuneatly I have already extended myself into the.NET conversion.
|
|
|
|
|
Anonymous wrote:
This makes no sense, and essentially makes Microsoft a liar!
The documentation never said this would be, in fact the opposite.
I would not have changed to NET, had I known this.
It's this kind of crap that really pisses me off! Microsoft is not to blame here. Did Microsoft install Windows or the .NET Framework on those notebooks? I doubt it. Focus on the problem, not the blame!
I would recommend trying to uninstall the .NET Framework on those machines and reinstalling it. Any patches would also be a good idea.
There is nothing between a notebook and a desktop that would could such a problem. The problem appears to be related to the Windows and .NET Framework load on those machines. It would be worth it to develop your own Windows load for the notebooks, with you yourself garanteeing that everything is installed properly.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I had develop the software in vb6. i upgraded it into vb .net.
now i want to run my designed crystal reports (designed in cr 8 & 9) in vb .net without any designing change.
plz tell me what are the steps should i have to take
to run old designed cr reports in vb .net.
|
|
|
|
|
I'm building an application container where I want to host and navigate between applications. The applications may be external exe's (not developed by me), custom applications (developed by me) and webpages.
I want to be able to monitor running/available applications and start/stop/display/hide them accordingly. Eligable applications will probably be listed in a config-file.
Applications must be able to operate simutanesly and be independent of each other in terms of one application going down. If possible the applications should be able to communicate/interact with each other, but I can't guarantee that all applications will be installed at the same time.
The application must be able to share different hardware (printers, cardreaders) and data (customer info etc). Prefferably controlled by a "core"-class.
What technique would be appropriate for this kind of task? I have concidered loading the applications via wrappers as plugins to my core-class but would like to have a more decouple approach.
Tanks in advance...!
-- modified at 5:11 Monday 10th October, 2005
|
|
|
|
|
Not to be rude or anything, but isn't this called "Windows"?
I just fail to see what your "container" is supposed to do...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yes, in a way you are right but my application will be installed where I can't trust the users. My container will be used as shell to avoid tampering with other applications.
Also the sceen will be a touch screen and hence I want to be able to control the apperance of it. Large buttons with self explanatory pictures etc.
So back to the question, how would I build this mini-windows and how to design for this infrastructure communication?
|
|
|
|
|
|
what is logical difference between a=a+50 and a+=50 .
who is faster
himanshu
|
|
|
|
|
The addition assignment operator += was probably just added as it is shorter and looks cooler. It's used in other languages and I read somewhere theat in C it is marginally more efficient once compiled than using x=x+n. So to see if the is a difference in vb.net I ran 500 passes through:
For i As Double = 0 To 100000000
For j As Double = 0 To 1000000000
i += rand.Next(0, 100)
j += rand.Next(0, 100)
j += rand.Next(0, 100)
i += rand.Next(0, 100)
Next j
Next i
(and then did it for the i = i + blah version)
and averaged the result.
results:
x+=n : 3.7274s
x=x+n : 3.7071s
I doubt the difference is significant, it probably needs more passes. It ran one pass through one version, then one pass through the other version, repeatedly, so the difference wasn't due to an external influence.
|
|
|
|
|
Here's my 2 cents worth:
I would think that the processing time gained by using the assignment operator is neglible if the variable is something like an integer or double, but when it becomes more complex, with database calls and long calculations etc, it will be more efficient to evaluate the variable only once as opposed to twice as in i=i+1 ?
Dave
|
|
|
|
|
There is no logical difference at all. I doubt that there is any difference in execution speed because the compilers are 'smart enough' these days to optimize the code anyway. The only difference I can see is the one of personal preference or readability. Personally I prefer a+=50 rather than a=a+50 but one could argue that the latter is more meaningful to anyone who reads the code.
...Steve
|
|
|
|