|
Dattatraya Kale wrote: and the instance should call parameterised ctor.
var obj = new MyClass("c:\\"); -> what should be JS code.
Why you are trying this ?
If you want to pass client side variable to C# class, use HiddenField, Store values in hidden field and access from C# class from code behind .
cheers,
Abhijit
CodeProject.Com MVP
|
|
|
|
|
Thanks a lot for yr reply
but i do want to call that dll from client side
and not from server side.
|
|
|
|
|
Dattatraya Kale wrote:
but i do want to call that dll from client side
Then you can use ActiveXObject .
cheers,
Abhijit
CodeProject.Com MVP
|
|
|
|
|
Thanks once again .
yup i tried that approach but i am missing something related with dll.
When i try to create instance it is giving javascript error
"Automation server can't create object."
Please give me Steps to create dll.
and sample code ..
Thanks in advance !!
DaTtA
way2datta@gmail.com
|
|
|
|
|
|
Hai,
I have a user control in my master page,which shows the company logo based on the language selected from the dropdown in the content page,the logo comes dynamically from different language folders,I update a session variable when I change the language in the dropdown,but when I update the language the user control is not getting refreshed,only reloading the page changes the logo.
cheers,
Thomas.
|
|
|
|
|
Hi Thomas,
Add following code where you update the Session variable.
Response.Redirect(Request.Url.ToString());
Thanks,
Padmanabh Ganorkar
|
|
|
|
|
Hai,
if (ddl_language.SelectedItem.Value.ToString() != "0")
{
HttpCookie cookie = new HttpCookie("viterion_app_language");
cookie.Value = ddl_language.SelectedItem.Text.ToString();
cookie.Expires = System.DateTime.Now.AddDays(365);
Response.Cookies.Add(cookie);
}
From this cookie, the session varible is updated in the master page through the init event.
The code is
HttpContext.Current.Session.Add("app_language", HttpContext.Current.Request.Cookies["viterion_app_language"].Value);
cheers,
Thomas.
|
|
|
|
|
what your code ?
|
|
|
|
|
Hi,
I want to hide the toolbar and menu bar address bar, when my webpage is loaded.that is immediately after the URL is requested.I am using ASP.NET(C#). And also need to block the F5 KEY coz its a shortcut for refresh.
reply ASAP.
THANKS IN ADVANCE
zari
|
|
|
|
|
why u wana do this . u can simply search from google
|
|
|
|
|
I used this script,
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top=0,left=0,scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open('Login.aspx',myname,settings);}
and called the function in onload of tag..... but it keeps on loading again n again
zari
|
|
|
|
|
Hi,
I am using WebBrowser Control and passing the url at run time.
I want to insert some text or javascript into the body of the web page being loaded in the browser.
I tried like below.
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
WebBrowser browse = (WebBrowser)sender;
if (!(webBrowser1.Document.Body.InnerHtml.Contains("Hello")))
{
webBrowser1.Document.Body.InnerHtml = browse.Document.Body.InnerHtml + "<script type='text/javascript'> var Hello; var i; var totalTable = document.getElementsByTagName('table').length; for(i=0;i < totalTable; i++) { document.getElementsByTagName('table')[i].id = 'name' + i; } function myfun() { this.style.border = 'solid 5px Red'; } function myfun1() { this.style.border = 'none'; } for(i=0;i < totalTable; i++) { document.getElementsByTagName('table')[i].onmouseover = myfun; document.getElementsByTagName('table')[i].onmouseout = myfun1; } </script>";
}
}
But, This is not working. This event is fired many times for single page.
Thanks,
Nagaraj
|
|
|
|
|
Hi all,
I have a dataview which contains song titles retrived frm the database and when user click on the play button on each row corresponding song should play.
How can i do the same
Thanks in advance
|
|
|
|
|
u simplay drag drop the sound file and declare them in program.
|
|
|
|
|
I didnt get u can u please give a detailed description please..
|
|
|
|
|
hi Friends ,
I have to make an assignment where i have to insert date in a textbox from a calender calender(ASP.Net.plz send me coding if any one can.
|
|
|
|
|
jasjit jas wrote: I have to make an assignment where i have to insert date in a textbox from a calender calender(ASP.Net.plz send me coding if any one can. Wink
So you want some one else do your home work . I suggest Please Buy a Beginner's ASP.Net Books .
cheers,
Abhijit
CodeProject.Com MVP
|
|
|
|
|
jasjit jas wrote: insert date in a textbox from a calender calender
under Calendar1_SelectionChanged event write this snippet
textbox1.Text = Calendar1.SelectedDate.ToString();
hope this helps
Regards,
SunilWise
|
|
|
|
|
I am glad to help you,please contact me with MSN:mazk_good@hotmail.com
|
|
|
|
|
Hi all,
I have a problem with cookies.
I use a cookie with key/value pairs for storing articles.
I have a button "Add article" which adds a key/value pair to the cookie.
When the page reloads I need to access all the values in the cookie and display them.
the problem is that when the button is clicked the cookie is added to the Response and will not be present in the Request until another reload since - I guess - the button event handler is being executed during the page load.
If I add an article it won't show up until I do another reload on the page.
Does anybody have an idea how I can add the cookie with a button and have the value in the Request when the page loads next time.
Hope someone out there understands what I'm trying to explain.
Thank you for your help!!
|
|
|
|
|
Whatever code you have to display the articles can be called from 2 places from page_load and the same code can be called in the button event handler after you add the article to your cookie.
|
|
|
|
|
If I put trace=true for the page I can see that the Response Cookie collection contains my cookie (with the new key/value) after I have pressed the button
but
The Request Cookie collection does not contain the cookie with these Key/value.
to get the Response Cookie collection to be transferred to the Request Cookie collection I need to do another reload of the page.
I need to access the cookie directly when the page is loaded after the button has been pressed.
Is this possible?
Can I in some way have a button that has it's event handler code executed before posting?
|
|
|
|
|
The page load event happens before the button event handler. So the option you have is to again submit the page in the button event handler or to call the method that displays the articles in the button event handler for subsequent submits and for the first time when the page is loaded call that in the page load method.
|
|
|
|
|
Thank you! It works!
I added a method for the update of my GridView and calls it from GridView_Load and the end of the button event handler.
Thanks again!
|
|
|
|