Link to home
Start Free TrialLog in
Avatar of AVARICESOFT
AVARICESOFTFlag for Pakistan

asked on

execute server side code via javascript in asp.net using C#.net

hello,

kindly tell me how to execute server side code via javascript using C#.net in my web application

but not the static method .. or open.window because i don't want to open the windows because to many data on the server side and impossible to send on the anotherpage for process via cache or session ... and static method is not because my application is dynamic and if i use static method then its useless..

please help me.. !! fastly
ASKER CERTIFIED SOLUTION
Avatar of Meir Rivkin
Meir Rivkin
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AVARICESOFT

ASKER

please give me this example on c#.net i explicitly mention in my code not vb

replace VB code in <script runat="server"> with the follownig:
protected void myServerButton_Click(object sender, System.EventArgs e)
{
    Response.Redirect("http://www.asp.net/");
}
not working :(
can u post your aspx code?
attached the file which u have made.. !!
my answer should be treated as guideline not a copy/paste.
did u follow the explanation above?
did u go through the link i've posted from codeproject to understand the solution?
Avatar of Saber37886661
Saber37886661

If you are using Telerik controls just use the Ajax control.
Then it in if your RadAjaxManager is called RadAjaxManager1 it is:
RadAjaxManager1.ResponseScripts.Add("Javascript function name");
and i want to call this Javascript function when new node is entered ..

and only call the function and its gooes to the javascript then go to the server side call my serverside function then i achieve my objective

only call server side function via javascript

thanks.

as a matter of intrest, if you have 2 open questions in here pertaining to the same problem (well the two issues must mesh) why are they seperate, and why complicate it all by using a javascript layer in here? I dont understand why you are not just using ajax. That way your form doesnt change and you then have access to Teleriks rich server side controls.
i only want to call the server side function in the javascript thats all .. only tell me how .. nothing meshing the question ..

and no button or click event occur .. or no static page method or webmethod...


i only want a code in javascript which calls serverside function


thanks i get the solution