|
i have a webpage that use javascript that call some method in a webservice, the webservice is registered into scriptManager of the masterPage of my web application. the page works fine at the begining and after while its not working, i dont know why, all javaScript that use webService methods is stopped even the links of the menu (the menu is created dynamically using a webService to get the links that the user is able to access),iam using kaspersky antivirus. i tried to stop the anti-virus and its work fine then, i could not understand the relationship between the antivirus and the webService or javaScript? and i dont know if its true that the problem is with kaspersky? if so, how could i deal with running antivirus? if not then where is the problem ?
and thanks
Programming is away of life
|
|
|
|
|
|
You should jus put the image inside a link or inside a button then use the onlclick from there
|
|
|
|
|
give commandArgument to image button.
protected void Image1_Click(object sender,ImageEventArgs e)
{
string s = Image1.CommandArgument.toString();
}
Best Regards,
Chetan Patel
|
|
|
|
|
I have a buttonfield in a gridview control.I want to retrieve the value of the buttonfield when we select the buttonfield.How is it possible.I tried ,but i cant retrieve the buttonfield value.
string s = GrdAdmnCriteria.Rows[RowIndex].Cells[2].Text;
i do like that.in the 2 cell of grid the buttonfield.but it will retrieve nothing what is the treason
|
|
|
|
|
use commandArgument
private void Button1_Click(Object sender,EventArgs e)
{
((Button)sender).CommandArgument.ToString();
}
Best Regards,
Chetan Patel
|
|
|
|
|
Hello friends...
In my applicatioin i have to upload images without using file control bcoz i don't want to show a textbox and button, insted i want to show a simple image on click the browse window should open.
For that what i have done i have used file control as a hidden field and called its click event on the image click......
Its working fine but i have to upload this image also on the server for that i have written code on the buuton1Click event.
now i have a function which takes the id of these two controls and called its click event one by one..
My problem is that if i have button_click event first and file_click event second both the event fired..
but as per the requirement the file_click should fire first in this case button_click is not firing...
What should i do now...
Help me plzzz
Deepak Nigam
|
|
|
|
|
You cannot do what you want to do. The best you can do, is to find a way to style the button that is part of the file upload control, to be the button with the image on it. Your browser works hard to stop you from interacting with the file upload control on the client side, for security purposes.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have created a class that returns a class object which have info about the username,pwd,emailid of current user.
Now i want to use this email id in my aspx.cs page to show the current logged in user and its email id....
i m creating an isntance of that class and using that to get the user email...
but i m getting null...
anyone had any idea?
Thanks in Advance,
|
|
|
|
|
your obviously not setting it at the right time, read through your code and make sure the username is declared and avaliable before you set it to show to the current user
|
|
|
|
|
Did you inspect the Request.ServerVariables collection?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
I have class named clsUser and function like
public clsUser ValidateUser(string userName,string password)
where return type is the class itself returning username,pwd and emailid of teh user
I want the username and email id of logged in user
what will b the syntax
|
|
|
|
|
salon wrote: class named clsUser
In a class file you may need to use System.Web.HttpContext.Current.Request notation to access the collections.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
I am not able to add this namespace
|
|
|
|
|
my class is like this
public myUser ValidateUser(string userName,string password)
{
//validates user with UN and pwd
}
return myUser;
where myUser keeps UN,pwd, emailid
Now i have an aspx.cs page which is getting redirected when teh above class verifies it since above class is used in login page
Now i m getting all teh data in return myUser;
I wnat to use it in the redirected page....
I don't think any viewstate or server variables are needed...is it so...?
|
|
|
|
|
salon wrote: public myUser ValidateUser(string userName,string password)
{
//validates user with UN and pwd
}
return myUser;
Where is this method ? Is this inside the myUser class ?
salon wrote: I wnat to use it in the redirected page....
You can create an instance of the class and use it. If your class is located inside app_code directory or using the same namespace which webpages have, you can use the class directly, else you need to import the namespace to get access to the class.
|
|
|
|
|
yes!
and it is returning values as expected..
Username,password and emailid
I wnat in return myUser;
i need this class in my aspx.cs page which is teh page after redirection
|
|
|
|
|
yeah i m able to access System.Web.HttpContext.Current.Request if i want to get the email address of the current user then what should i use?
|
|
|
|
|
|
If you create an instance of a class, how do you expect that value to be instantiated ? Are you trying to pull it out of the session ? That's where you need to store info about the current user, nothing else is going to persist between pages.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I just need to get data, "POST" from the client side (by javascript with send method) in the page asp.net page with C# code. i have used:
var xmlHttp = GetXmlHttpObject();
xmlHttp.open("POST","SaveInfo.aspx",true);
var args = "id=" + ID + "&name=" + Name + "&sex=" + Sex + "&age=" + Age;
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.setRequestHeader("Content-length", args.length);
xmlHttp.setRequestHeader("Connection", "close");
xmlHttp.onreadystatechange = function theStateChanged()
{
alert(xmlHttp.status);
if (xmlHttp.readyState==4 && xmlHttp.status==200)
{
alert("Successfully Saved");
}
}
xmlHttp.Send(args);
So, this is the code.
I want to access the args from the page SaveInfo.aspx . how can access that to save those on the database using C# code on this page.
Please help me.
Dipak
|
|
|
|
|
Please don't post same questions in multiple forums.
You can get your answer from here[^] or google[^].
*jaans
|
|
|
|
|
any method to get font-family of string
|
|
|
|
|
meghamaharshi wrote: get
Did you check fontFamily in JavaScript?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|