6/29/2025 1:32:02 PM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
|
|
|
|
IsPostBack Always True on Page_Load for .ascx user control. Not sure how to work around it. 
Posted: 14 Sep 10 5:12 PM
|
I cannot seem to get the IsPostBack in Page_Load to return False, it always returns true. The form is run from a ToolBar Button on the Customer Portal and points to the .ascx page that runs this code when it is called. It then redirects to the next page that does an Html Post. The problem is, it runs every time the Customer Portal is opened, the IsPostBack always returns true and as a result, it goes right to the redirect in this code. Any ideas. I saw suggestions on using OnFromBound or OnLoad events, but I'm not sure how to use them or if they'll accomplish what I need.
Thanks for any help on this.
Tim
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls;
public partial class PostSCK : System.Web.UI.UserControl { string login; protected void Page_Load(object sender, EventArgs e) { if(!Page.IsPostBack) { Sage.SalesLogix.Security.SLXUserService userService = Sage.Platform.Application.ApplicationContext.Current.Services.Get() as Sage.SalesLogix.Security.SLXUserService; Sage.Entity.Interfaces.IUser user = userService.GetUser(); Sage.SalesLogix.Web.WebPortalUserService portuser = (Sage.SalesLogix.Web.WebPortalUserService)userService; Sage.SalesLogix.Security.PortalUser portalUser = portuser.GetPortalUser(); login = portalUser.UserName; Response.Redirect("http://ServerName:3333/retSCK/RemotePost.aspx?l=" + login); } else { } } }
|
|
|
| |
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|