|
The javascript variable is in memory in the Browser Instance. The ASP variable is in memory in the Web Server instance. Two different processes.
Values in the Browser are transfered to the Server by sending a POST or GET request to the Server . Values in the Server are sent to the Browser in the Response Stream of the request.
|
|
|
|
|
Don't cross post.
I answered this in the ASP.NET forum.
---
single minded; short sighted; long gone;
|
|
|
|
|
Actually when i run my application in firefox and in Internet Explorer my pages are not appeared similar. So I want to know how to auto adjust the pages so that they appeared similar in any browser.
|
|
|
|
|
You basically have to play with your CSS until you find styles that render the same in both.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
There are some tags which are supported by IE but not by FireFoz and vise versa.
Sometimes you need to use HTML tags according to browser type. Browser compatibility may prove to be a very big issue if you dont pay attention from scratch.
So just keep your design simple and follow basic HTML rules and test your design on other browsers like Opera and Safari while developing your site.
Best Of Luck
“The woods are lovely, dark and deep. But I have promises to keep, and miles to go before I sleep.”
|
|
|
|
|
i am have developed a project on jsp and end user script is javascript.
then i have uploaded the same in my intranet site.
It woked for IE, netscape and firefox.
But it did not show up in the safari browser of the mac.
how do i go about solving the issue
is that becoz of the compatibility?
|
|
|
|
|
Yes, it may be a compatibility issue. For some JS events, Safari behaves differently than IE and Mozilla.
Like in IE and Firefox, onFocus event is treated same as OnClick event. But safari donot.
Sometimes onBlur also creates some problems in Safari.
You have to debug your script to find the code which is not working as expected.
Best Of Luck
“The woods are lovely, dark and deep. But I have promises to keep, and miles to go before I sleep.”
|
|
|
|
|
Hi,
I have encountered problem when saving string value with double quote in it. When I attempt to save it into the mssql database an error message will display.
Example:
Textbox1.text content is - Round Bar 1/2" dia.
Dim sItemID = "00001"
Dim sDescription = Textbox1.text
Dim ItemCmd = New SQLCommand("Insert into Item " _
& "(" _
& "ItemID, " _
& "Description " _
& ")" _
& "Values " _
& "(" _
& "'" & sItemID & "'," _
& "'" & sDescription & "'" _
& ")"
During saving the error will occur:
String or binary data would be truncated.
The statement has been terminated.
The error will be fixed if I add the "SET ANSI_WARNINGS OFF" in my sql statement, but this is not the ultimate solution because the double apostrophe or quotation will be removed by the system itself when saving.
And, if I removed the "SET ANSI_WARNINGS OFF" this error will display:
Unlclosed quotation mark
Is there a way to resolve it?
I have been solving this for two days already and no luck yet.
Thanks Guys
hifiger2004
|
|
|
|
|
A quotation mark (") is not a problem in an SQL string. Are you sure that it's not two apostrophes (')?
You have to escape apostrophes in string values by doubling them if you put the values directly in the SQL query. It's better to use parameters instead of putting the values directly in the query.
---
single minded; short sighted; long gone;
|
|
|
|
|
You're right guffa, I changed my way of coding instead of putting it directly in the query, I used the sqlparameter approach and it works fine now.
Thank you
hifiger2004
|
|
|
|
|
Try putting the following text into your textbox1 and then think about parameterising this query:
'); delete from item; --
|
|
|
|
|
Hi,
i'm currently working in a .net web project.
i want to display the date in server side date format.
i'm getting the server side date as a string from a hidden control.
i want to convert that date string into javascript date object to get the date, month, and year.
var scheduleDate = new Date(hdnDate.value);
The above line of javascript code is working well for 'yyyy/MM/dd' date format;
That is returning 'NaN' for 'yyyy-MM-dd' and 'yyyy.MM.dd' date formats.
Can anybody help me in this.
Thanks in advance.
Regards,
Alagumani Boju.
|
|
|
|
|
If you represent the date as the number of millisenconds since 1970-01-01, you can safely create a Date object from that.
You can use (DateTime.Today - new DateTime(1970,1,1)).TotalMilliseconds to get the current date in milliseconds since 1970-01-01.
---
single minded; short sighted; long gone;
|
|
|
|
|
Guffa's solution is the best. You should use it.
But, if for some reason you must have the dates in yyy-MM-dd format, just do new Date(hdnDate.value.replace(/-/g, '/')) . This uses a regex to match all - chars and then replaces them with the forward slash.
But yeah. If you control the format, please go with Guffa's solution. You'll have far fewer headaches.
every night, i kneel at the foot of my bed and thank the Great Overseeing Politicians for protecting my freedoms by reducing their number, as if they were deer in a state park. -- C hris L osinger, Online Poker Players?
|
|
|
|
|
hi all
can any budy tell me Using ASP
How to find how many SQL server running in network
and list them
The Stifler
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
hi, i am writing php scripts that have the following format:
/// logic in "plain" php
......... some calculations etc.
// html output (html mixed with php) using the php variables defined in logic , as an example
<br />
<?php<br><br />
if($emsg)<br><br />
echo $emsg;<br><br />
else<br><br />
{<br><br />
?><br><br />
<table width="100%" ><br><br />
<tr class="sunBlockHead"><br><br />
<td class="Stil1Head" align="center"><span><?php echo $th1;?></span></td><br><br />
<td class="Stil1Head" align="center"><span><?php echo $th2;?></span></td><br><br />
<td class="Stil1Head" align="center"><span><?php echo $th3;?></span></td><br><br />
</tr><br><br />
<?php foreach ($result as $item) if($item["eStatus"]=="ok")<br><br />
{?> <br><br />
<tr><br><br />
<td class="Stil1" style="text-align:right;" width="10%" ><?php echo $map_currency[$item["sCurrency"]].$item["decUsableValue"];?></td><br><br />
<td class="Stil1" width="30%"><br><br />
<span style="float:left"><?php echo $map_type[$item["eTypeOfExpiry"]]?></span><br><br />
<span style="float:right"><?php echo cleanDate($item["dDateOfExpiry"])?></span><br><br />
</td><br><br />
<td class="Stil1" style="text-align:left;"><?php echo !empty($item["sDisplayText"])?$item["sDisplayText"]:"Gutschein";?></td><br><br />
</tr><br><br />
<?php }?><br />
i am using dreamwaver, and i am asking if there is any visualization help that can hide the php code embedded in <?php ?> or hide the html code, so i can concentrate on one of both when i need to change smthg. thanks
-- modified at 5:10 Thursday 20th September, 2007
|
|
|
|
|
Hi All,
In my application I want to send mail onto the gmail through my ASP Page. If its posible plz help me.
thanx & Regards:
SMK
|
|
|
|
|
ASP.NET has mail classes, but they rely on a pop3 server. ASP has nothing of value. So, if you're using ASP.NET, you can send mail, but not through gmail. If you meant just ASP, then no.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: ASP.NET has mail classes, but they rely on a pop3 server. ASP has nothing of value. So, if you're using ASP.NET, you can send mail, but not through gmail. If you meant just ASP, then no.
If it's only for sending email, ASP.NET can use System.Net.Mail classes including SmtpClient class.
For classic ASP and hosted on Windows 2000 servers, you can use Microsoft Windows CDO (Collaborative Data Object) to send email.
For more information on CDO, visit this link:
http://msdn2.microsoft.com/en-us/library/ms527525.aspx[^]
regards,
Eriawan
|
|
|
|
|
Hi,
I've to use the Enterprise library3.0 for my application.Can anyone tell me how to use the library and implement C# code for that.
Thanks in advance
Babu
|
|
|
|
|
When you install Enterprise library on your machine, there will be numerous code samples installed along with it. Install the library and take a look at those.
|
|
|
|
|
I need code in C# to populate checkbox in gridview to delete records.
Please help.
Thank you
Saranya
|
|
|
|
|
Hi!
I am asuming that you have placed check box in your grid. You have a delete button in your page. When you click on that button, it will delete all records for which the check boxes were checked.
If you have a different scenario then plz let me know.
You can use the following code in the onclick event of that button.
protected void btnDelete_Click(object sender, ImageClickEventArgs e)
{
string strUserId = "";
foreach (GridViewRow gv in gvUsersToDelete.Rows) //traverse thru each row of the grid
{
//chkDelete is the name of the checkbox you placed in the grid. We first find that checkbox from the current gridview row and get it in a local checkbox type object, cb.
CheckBox cb = (CheckBox)gv.FindControl("chkDelete");
if (cb.Checked == true) // now check if the check box in this row is checked or not
{
// our grid had User ID in its column 0. So we are getting the userid from the 0th column in the //current row.
strUserId = gv.Cells[0].Text;
DeleteThisUser(strUserId); // passing userid to DeleteThisUser function.
}
}
}
private void DeleteThisUser(String strUserId)
{
// code to delete the matching strUserId.
}
“The woods are lovely, dark and deep. But I have promises to keep, and miles to go before I sleep.”
|
|
|
|
|
Hi all
In VS2005 how can i display a msg to save before leaving the current page ONLY if the user has made changes in this page else i dont want to display the msg.
Is this possible? I have seen this senario working in CRM.
thanks
|
|
|
|
|
Oh dear. Cross posting and reposting. Naughty naughty.
Deja View - the feeling that you've seen this post before.
|
|
|
|