|
session is created in Server Side,
You need to call AJAX request for the session from javascript.
Abhishek Sur
|
|
|
|
|
You can access a Session variable in javascript function.Example:
function GetUser()
{
var user='<%=Session["userid"]%>';
alert(user);
}
now it shows the current value of Session["userid"].
ARINDAM
|
|
|
|
|
ARINDAM1981 wrote: var user='<%=Session["userid"]%>';
<%= >
is a ASP server side tag, it will execute the code and will replaced by the result.
The above code you have pasted is a code that is not executed.
View the page in browser and output will be in form
var user='some text';
|
|
|
|
|
It's obvious you have no idea what you're doing, perhaps you need to ask a higher level question about what it is that you're trying to achieve.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi, I am about to join a firm which is dealing with web-based invetory projects,but they r doing it in vb.net and i know and am confident in C#.net only.I have heard abt "converters".Could i rely on these converters to do my job? - Please help
|
|
|
|
|
|
Learn the other language - there really isn't that much difference. If you can't get used to the syntax with a day or so of learning, then there's probably something wrong...
|
|
|
|
|
Subin Alex,
I use C#-->VB and VB->C# converters from http://www.tangiblesoftwaresolutions.com; I do not work for them or associated with them in any way.
Your outcome will depend upon your proficiency level in both languages.
I suggest trying their demo versions to get a flavor of what might be in store for you.
At one time I used their demo versions at some clients to 'convert' some classes(and a few projects) that are several thousand lines of code. The demo only allows 100 lines at a time. I was so good at it, it only took 5+ minutes tops.
If anything, these types of converters can help you grasp the original language (or the language to be converted to) that much quicker.
ASP ~ Apple Simply Performs
|
|
|
|
|
Subin Alex wrote: Could i rely on these converters to do my job
No. Don't rely on them. If you know C# well, what's the big deal in programming VB.NET?
|
|
|
|
|
Hi Guys,
I want my webpage to be listed in the top 10 pages of the Google search,
How and what shud be done?
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Yadav Pramod wrote: I want my webpage to be listed in the top 10 pages of the Google search,
if this is a one day job then everyone may have done it for their websites.
This takes lot of time.
What you need to do
1. Add appropriate meta tags to your webpage
2. Add appropriate meta description to your page.
3. Wait.....
|
|
|
|
|
Wait!!! but for how much time?
Only addding meta tags will do the job?
or do i need to do anything else?
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
That depends...
1. How frequently the crawler visits your site
2. What is your page rank.
Some times it takes months.
You can also visit site like: sitesolution.com
|
|
|
|
|
|
My application has a online test module, where i generate controls at runtime. As shown in the code block below. I am inserting them in a datatable (one span tag in one row)
I want to bind it to a control (say gridview) and provide paging.
How can i do this? If i bind the datatable to the gridview i am able to see the html tags only but not the controls. I am
<span id="lblQuestion01" class="optQuizup"><br>1) CHSC Question1 (Marks 2)<br><br></span>
<span class="optQuizup"><input id="chkOption00" type="checkbox" name="chkOption00" onclick="uncheckOthers(chkOption00,0,4);" /><label for="chkOption00">vxcv<br></label></span>
<span class="optQuizup"><input id="chkOption01" type="checkbox" name="chkOption01" onclick="uncheckOthers(chkOption01,0,4);" /><label for="chkOption01">cxvcb<br></label></span>
<span class="optQuizup"><input id="chkOption02" type="checkbox" name="chkOption02" onclick="uncheckOthers(chkOption02,0,4);" /><label for="chkOption02">ghfgh<br></label></span>
<span class="optQuizup"><input id="chkOption03" type="checkbox" name="chkOption03" onclick="uncheckOthers(chkOption03,0,4);" /><label for="chkOption03">fbvcb<br></label></span>
<span id="lblQuestion11" class="optQuizup"><br>2) CHSC Question2 (Marks 2)<br><br></span>
<span class="optQuizup"><input id="chkOption10" type="checkbox" name="chkOption10" onclick="uncheckOthers(chkOption10,1,4);" /><label for="chkOption10">asdkf<br></label></span>
<span class="optQuizup"><input id="chkOption11" type="checkbox" name="chkOption11" onclick="uncheckOthers(chkOption11,1,4);" /><label for="chkOption11">ugodf<br></label></span>
<span class="optQuizup"><input id="chkOption12" type="checkbox" name="chkOption12" onclick="uncheckOthers(chkOption12,1,4);" /><label for="chkOption12">dfgkls<br></label></span>
<span class="optQuizup"><input id="chkOption13" type="checkbox" name="chkOption13" onclick="uncheckOthers(chkOption13,1,4);" /><label for="chkOption13">kldfjls<br></label></span>
Thanks
|
|
|
|
|
i need code for when click on button it opens a new html window and automatically saves that page .
modified on Tuesday, January 20, 2009 5:03
|
|
|
|
|
window.open('url') from javascript.
Abhishek Sur
|
|
|
|
|
Use Javascript
javascript:var w=window.open('TestPage.aspx','', 'width=625,height=760,scrollbars=yes,resizeable=yes');
Hope it helps
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswam@its.co.za
|
|
|
|
|
hi sir this only creates the page not save the page . can u tell how to write it without javascript.
|
|
|
|
|
Save the page where exactly? You cant force the user to save your page!
|
|
|
|
|
When you save a Page i don't understand what you mean , can you please elaborate.
Thanks
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswam@its.co.za
|
|
|
|
|
Jas 007 wrote: can u tell how to write it without javascript.
then use Page.ClientScript.RegisterClientScriptBlock from codebehind
|
|
|
|
|
hi abhijit can u clearly explains how to use this
|
|
|
|
|
<%@ Page Language="C#"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
public void Page_Load(Object sender, EventArgs e)
{
// Define the name and type of the client scripts on the page.
String csname1 = "PopupScript";
String csname2 = "ButtonClickScript";
Type cstype = this.GetType();
// Get a ClientScriptManager reference from the Page class.
ClientScriptManager cs = Page.ClientScript;
// Check to see if the startup script is already registered.
if (!cs.IsStartupScriptRegistered(cstype, csname1))
{
String cstext1 = "alert('Hello World');";
cs.RegisterStartupScript(cstype, csname1, cstext1, true);
}
// Check to see if the client script is already registered.
if (!cs.IsClientScriptBlockRegistered(cstype, csname2))
{
StringBuilder cstext2 = new StringBuilder();
cstext2.Append("<script type=\"text/javascript\"> function DoClick() {");
cstext2.Append("Form1.Message.value='Text from client script.'} </");
cstext2.Append("script>");
cs.RegisterClientScriptBlock(cstype, csname2, cstext2.ToString(), false);
}
}
</script>
<html >
<head>
<title>ClientScriptManager Example</title>
</head>
<body>
<form id="Form1"
runat="server">
<input type="text" id="Message" /> <input type="button" value="ClickMe" onclick="DoClick()" />
</form>
</body>
</html>
Sathesh.
Blessed is the season which engages the whole world in a conspiracy of love.
|
|
|
|
|
hi sir ,
your code does nt fulfill my requirments.
|
|
|
|