Yes you can call server code using asp.net page method.
this link will help you.
http://www.dotnetcurry.com/ShowArticle.aspx?ID=109&AspxAutoDetectCookieSupport=1
On Tue, Oct 14, 2008 at 7:01 PM, abhya <[EMAIL PROTECTED]> wrote:
>
> Thanks for the reply.
> But Still it won't works.
> Using Javascriot it works but need to fecth some details and hence
> server trip is must.
> Any approch to call server side function from javascript ..
> thnk u again!
>
> On Sep 30, 8:44 am, "Ramesh A" <[EMAIL PROTECTED]> wrote:
> > Yes,Response and Request contexts are available only Page classes.Theses
> > contexts are not available in user controls. If you need to use it in
> ascx
> > also then use HttpContext.Current.Request,HttpContext.Current.Rresponse.
> >
> > 2008/9/29 abhya <[EMAIL PROTECTED]>
> >
> >
> >
> >
> >
> > > Hello,
> >
> > > I have created two DefaultPages ie default1.htm and default2.htm using
> > > Frameset and frames.
> > > Based on Drop down selection which is a part (a control) of an
> > > UserControl, existed(a user control builded using two .net controls --
> > > ddl and Go button) on a Top Frame of both the default pages;and after
> > > clicking an Go button
> > > I have to redirect the user from default1.htm to default2.htm or vice
> > > a versa. the path about default pages is comming from Database.
> >
> > > I am using Go button a ASp.NEt control.
> > > On its cilck event, control comes at server code (ie event handler of
> > > go button in ascx.cs file) . In that I have fetch the redirecting URL
> > > from database. And then I have use
> > > Response.Redirect(PageUrl, false);
> > > But it WON'T Works.
> > > I have also tried Server.transfer(PageUrl);
> >
> > > Using javascript ie winodwas.top.location.href ='page.htm' calling on
> > > onClientClick of go button.
> > > It works fine. So that I have tried Response.Write("Javascript...etc
> > > etc"); but this also WON'T Works.
> > > I have also tried
> > > Page.ClientScript.registerStartUpScript("Javascript...etc etc")
> > > This also WON'T Works.
> > > Does all this happens because of I am coding in "ascx.cs" file ie a
> > > code behind file for UserControl or i am doing some thing wrog?
> > > (Which is used in a top frame of both default.htm pages).
> >
> > > People please guid me on this issue.
> > > Thank you in advanced.- Hide quoted text -
> >
> > - Show quoted text -
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/DotNetDevelopment
You may subscribe to group Feeds using a RSS Feed Reader to stay upto date
using following url
<a href="http://feeds.feedburner.com/DotNetDevelopment">
http://feeds.feedburner.com/DotNetDevelopment</a>
-~----------~----~----~----~------~----~------~--~---