February 25, 2009 – 11:35 am
You can get variable from javascript and use it in code behind code in dotnet variable it means server side variable.
Dim strMessage2 As String = “”
Response.Write(“var str1 =
prompt(‘Please Enter Password:’,”);”)
strMessage2 = “document.write(str1);”
Response.Write(strMessage2)
February 5, 2008 – 2:32 pm
Source : http://forums.asp.net/p/839953/840084.aspx
This example shows how to validate the LastName textbox but only if the FirstName textbox contains a value. The first part is simply HTML tags with the form controls, the second part is simply the code for “onblur” even in the Page_Load event handler.
FIRST HTML
*****************************************************************************
<%@ Page Language=”vb” AutoEventWireup=”false” Codebehind=”WebForm1.aspx.vb” Inherits=”ValidationChange.WebForm1″%>
<!DOCTYPE HTML PUBLIC “-//W3C//DTD [...]
February 5, 2008 – 2:31 pm
I will try to explain the difference between RegisterClientScriptBlock and RegisterStartupScript . I have experienced the difference while I was doing some stuffs yesterday. Here is what I was doing. I had a hidden field called txtHiddenField, an update button and some tabs in my page. I also have a javascript function called DisplayTab.
function DisplayTab(tabId)
{
var [...]
August 13, 2007 – 5:38 am
I recently came accross javascript date features and i find it very interesting. You can compare dates, set date on client side only and it increases user friendlyness..Few examples are here…
Set date , by adding one day in mm/dd/yyyy format
var d = new Date(fromDate);d.setDate(d.getDate()+1);//alert((d.getMonth()+1)+”/”+d.getDate()+”/”+d.getYear());
——————————oneMinute = 1000 * 60;oneHour = oneMinute * 60;
oneDay = oneHour * 24;
GapTimeSpan = Date.parse(tCallOutDateTime) [...]