|
ais07 wrote: ("OnClick", "ActivateCountry(" + this.Page + "," + lnkAddCity + ")");
First you need to understand what you can pass using JavaScript and what not
Do
You can only pass string values from
one function to another
one page to another
Don't
You cannot pass any object using JavaScripts
You can save object in session and then access it on another page.
|
|
|
|
|
Thanks For Reply
I had done this before but by passing page in HTML code of my webpage.
|
|
|
|
|
ais07 wrote: önsubmit="ActivateCountry(this);"
You are passing javascript object to a javascript function.
But you cannot pass a javascript object to ASP.net
and reverse is also not true
|
|
|
|
|
That's not correct, you can pass javascript objects in javascript functions. I think you might be getting confused with trying to pass the ASP.net Page object to a javascript function (which indeed, you cannot do).
|
|
|
|
|
I mean, you cannot pass objects between javascript and asp.net
but one can pass objects between javascript functions.
|
|
|
|
|
You can't do it like that, as you're trying to pass an asp.net object to JS. You can do it like you had it in your reply below:
lnkAddCity.Attributes.Add
("OnClick", "ActivateCountry(this," + lnkAddCity + ")");
|
|
|
|
|
Thanks For Reply,
I tried the code by using this also but it is not working.I just want to ask you on question can we pass or access session variable in js file if yes then how.
|
|
|
|
|
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
|
|
|
|