|
Create a DateTime value instead of a string.
To compare two dates you can use the regular operators, i.e. <, <=, =, !=, >, >=.
To get the difference between two dates you can subtract them. The result is a TimeSpan value.
---
b { font-weight: normal; }
|
|
|
|
|
Dim date1 As Date
Dim date2 As Date
date1 = "9/25/2006 8:02:44 PM"
date2 = "9/23/2006 8:02:44 PM"
If date1 > date2 Then
Response.Write("date1 is recent")
Else
Response.Write("date2 is recent")
End If
not the best way to do it but still you can
|
|
|
|
|
Dear ..
You can use Now() function, Just you can compare the date and month and year... such details are found in Now.compare with Now and give the Comditions and get the result,
Another way is you can take it from Query..
Rame..
|
|
|
|
|
Hi,
I have been going crazy trying to find a tutorial or something which will
clearly explain to me what ErrSub is and also how to use it to get more
specific debugging solutions.. please help!
Thank you.
|
|
|
|
|
hello dears
i want to add javascript to webapplication(asp.net)
and how to use it
ashrafhakiem
ashraf_23_2005@yahoo.com
|
|
|
|
|
|
Hi...
What kind of javascript you have to add... we can add javascript easily in asp.Net page. you can add like this in HTML page//
function test()
{
alert('This is a test Page');
}
and you can call this function in ..Onclick or Page load or what ever it is..
here i have give you the example for calling function in onclick
btnSubmit = it is a button name
btnSubmit.attributes.add("onclick","javascript:return test()";)
TRY THIS AND GIVE ME YOUR FEEDBACK.
Rame..
|
|
|
|
|
parveen_banuk, has given you the code how to call a java scrip onclick event of a button.
here is how to call that script in page load.
Dim MyString as String = "test()"
Page.RegisterStartupSvript("MyScript", MyScript)
hope this give you some ideas.
cheers
|
|
|
|
|
Hi Dears,
I have a simple question can any body helpme please.
My Question!!:
I wanted to redirect user to another NTLM authentication based ASP.NET application, and it resides in a different server and also different Domain, but with out promting login box secound time.
More Elaboratively:
I have a username and password of mytarget application, I need to redirect user to that target Application, which is configured as Windows Integrated Authentication.
Here the issue is when the user is redirected to mytarget application it is prompting for credentials, Can we avoid the login box second time?
another way can we avoid multiple login boxes.
Vijay Bhasker Reddy CH
|
|
|
|
|
if the other domain server contains the same username and password, impersonate the currently supplied username and password to the other.
|
|
|
|
|
Hello
I am using my.settings to create a application scope connection string.
The customer would like to change this if they want to connect to another database, and this should update the app.config file with the updated connection string.
My problem I have into the setting and create a connection string (easy). But I don't know and can't find out to update and save the new connection string.
My.Settings.cnnString = "This is example connection" 'Error read-only property
I am using vb.net 2005
Can anyone help,
Thanks in advance,
Steve
|
|
|
|
|
To access and modify web.config or app.config you need to use Xml Classes.
|
|
|
|
|
Hi steve
You can use web.Congig Connection for this Problem. If you get web.Config Connection string means it is very useful for future updation for connection.If you use the same Connection is whole project means . you dont want to change it for whole application. just you do the nessecary changes in we.config.In Web.Config you can access more than one database.
Rame..
|
|
|
|
|
Hello
I am using my.settings to create a application scope connection string.
The customer would like to change this if they want to connect to another database, and this should update the app.config file with the updated connection string.
My problem I have into the setting and create a connection string (easy). But I don't know and can't find out to update and save the new connection string.
My.Settings.cnnString = "This is example connection" 'Error read-only property
I am using vb.net 2005
Can anyone help,
I got this code and it seem it would work. However, there is a problem with the code. I get a "Object reference not set to an instance of an object."
Here my code.
<br />
Dim config As Configuration.Configuration = Configuration.ConfigurationManager.OpenExeConfiguration(Configuration.ConfigurationUserLevel.None)<br />
config.ConnectionStrings.ConnectionStrings("ServiceMasterConnectionString").ConnectionString = "This is new connection " 'Error - <br />
config.Save()<br />
Thanks in advance,
Steve
|
|
|
|
|
I implemented Datagrid with PageindexChangeevent but i need scrolling concepts in the datagrid. Please do help.
kokila
|
|
|
|
|
hi,
take ur datagrid in DIV tag...
<div style="height: 250px; overflow: auto;">
<asp:DataGrid runat="server" ...>
...
</asp:DataGrid>
</div>
Thanks & Regards...
Amit
|
|
|
|
|
Thanks Amit, and it's working fine.Iam the beginner of .net so thank you for your immediate help . Can you guide me to create popupmenus forweb based project.
Thanks & Regards,
kokila
|
|
|
|
|
hi,
the basic concept behind menus in webbased project is to display and hide html elements. here is the simple code explaining this concept. u can format according to your need...
<HEAD>
<style type="text/css">
a.links:link { font-family : Arial; font-size : 12px; color : white; text-decoration : none; }
a.links:visited { font-family : Arial; font-size : 12px; color :white; text-decoration : none; }
a.links:hover { font-family : Arial; font-size : 12px; color : #FF9C03; text-decoration : none; }
td.menu{background:#4891C6}
table.menu {font-size:100%; position:absolute; visibility:hidden;cursor:hand }
</style>
<script type="text/javascript">
function showmenu(elmnt)
{
document.all(elmnt).style.visibility="visible"
}
function hidemenu(elmnt)
{
document.all(elmnt).style.visibility="hidden"
}
</script>
</HEAD>
<body topmargin="0" leftmargin="0" rightmargin="0">
<table width="100%">
<tr bgcolor="#4891c6">
<td style="cursor: hand" onclick="location.href='page1.aspx'" width="14%" onmouseover="showmenu('Mainmenu1')" onmouseout="hidemenu('Mainmenu1')">
<a class="links" HREF="page1.aspx">MainMenu1</a><br>
<table class="menu" id="Mainmenu1" width="100%">
<tr>
<td onclick="location.href='page1.aspx'" class="menu"><a class="links" HREF="page1.aspx">MenuItem</a></td>
</tr>
<tr>
<td onclick="location.href='page1.aspx'" class="menu"><a class="links" HREF="page1.aspx">MenuItem</a></td>
</tr>
<tr>
<td onclick="location.href='page1.aspx'" class="menu"><a class="links" HREF="page1.aspx">MenuItem</a></td>
</tr>
</table>
</td>
<td style="cursor: hand" onclick="location.href='page2.aspx'" width="14%" onmouseover="showmenu('Mainmenu2')" onmouseout="hidemenu('Mainmenu2')">
<a class="links" HREF="page2.aspx">MainMenu2</a><br>
<table class="menu" id="Mainmenu2" width="100%">
<tr>
<td onclick="location.href='page2.aspx'" class="menu"><a class="links" HREF="page2.aspx">MenuItem</a></td>
</tr>
<tr>
<td onclick="location.href='page2.aspx'" class="menu"><a class="links" HREF="page2.aspx">MenuItem</a></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
Thanks & Regards...
Amit
|
|
|
|
|
hi,
i m using vs.net 1.0 and not able to run project in debug mode. program doesn't halt at any break point.
help plz...
thanks in advance
Regards...
Amit
|
|
|
|
|
Crystal report version for INVENTORY application. It gives us error to see the crystal reports which uses the crystalreportviewer component in aspx pages.e.g.FormInvSRFViewPrintingDetails.aspx which shows the error.
If we try to use our version /dlls it does not show the report and gives error when the application is running.
The component shows the version as 'Version=9.1.3300.0' and when Sameena asked Milind (Cybertech) about the version of Crystal reports used...he said he'd used version 7 for it. The framework which is used on server is different than our working version. and that is only framework which we cannot use for developement purpose.
If we make changes in the code and build the dll and put it on the server then it gives error when we try to print the reports.(the printing reports are mainly use the crystal reports dlls.)
So any changes done in the code anywhere in the project give us problem related to the report version as the crystal dlls has different version than it has on the server.
We got the crystal report version 8 from CG also ,which itself is giving error when installation takes place...SO it's of no use.
We are looking for the correct version of it which we haven't got yet.
So as of now we cannot proceed further on inventory module. Plz try to look in the matter from your side also .
Hi all,
dfsdfasdfsd
|
|
|
|
|
I am facing specific problem with firefox browser. I have integrated payment gateway in my website. it is working fine in internet explorer. But I am facing problem with firefox and opera browser. I have some values in session like client id, client name. when I redirect from payment gateway to own site(e.g. thankyou page) I want to access all session variable. It works fine in IE but in other browser session value destroy. it works in local system problem is with online only.
Problem occures when I return back from payment gateway to my own web page. e.g.-
step 1. payment page(my website page)
step 2. paypal (payment gateway)
after successfull payment on payment gateway when we click "return to merchant" button..
step 3. thankyou page (my website page)
I want to use session variable "I created in payment page(my website page)"
I can use these session variable in IE but in case of firefox or opera I cannot get these variables.
Thanks
Bhushan
|
|
|
|
|
hi
i am populating datagrid with eno,ename,salary from database. i have taken two link buttons for view and modify all the details of the particular record.When i click the modify link iam displaying all the details in textboxes with previous values in the pageload event of the modify page.Now i edited the values and click the save button on the modify page.But my database is not updating with modified values.i checked my query its syntax is fine.but in query iam not getting the values that i modified.please help me out.
thanks
vijay
|
|
|
|
|
If the modify.aspx is different from you datagrid.aspx then put all the data binding in the Page_load inside IsPostBack.
|
|
|
|
|
Dear Vijay..
Please check whethere the page post back is true or false .. in page_Load Event.. because if you put the post back is true in page load.. The values will not reflacted..
Rame..
|
|
|
|
|
I have a Pb with report viewer, i can print my report correctly but i can't show it in a browser corectly !!!
|
|
|
|