I want to store a users dialect in a cookie on his machine, and then look it up before loading the version of my web app. What is the code to do that.
View Complete Post
We have the implement the following scenario in our application:
I tried implementing it in following way.
if (Request.Headers["Cookie"] == null)
//this means user is requesting hte page for first time.
//Generate a new GUID store it in session and also in the hidden variable on page.
Session["DefaultPage"] = Guid.NewGuid().ToString();
((TextBox)page.FindControl("hiddenGUID")).Text = Session["DefaultPage"].ToString();
else if (Reque
When a user starts a membership using the Create User wizard supplied by the aspnetdb profile service, I need to add a field to a table in aspnetdb and upon clicking the ContinueButtonClick insert some data. The field I'll add is "SubscId". My first question is what table is best for this - Users or Membership?
Secondly, what is the best way to insert new data for this scenario? code behind? markup? Can someone provide basic syntax of insert code in code behind for this scenario?
I have a Web Form that uses Master Pages. I only tell you this part so you understand the layers.
On the page, I have a web user control. I can see public methods on that user control by simply calling userControlName.PublicMethod();
However, there is a button on this page which generates additional content. This content is based on a placeholder control and adding additional web user controls :
private void buildSubForms()
// load in the Lesson Topic Sub Form
subForm = LoadControl("~/siteAssets/controls/ilasLT.ascx");
// load in the Reference Material Sub Form
subForm = LoadControl("~/siteAssets/controls/ilasRM.ascx");
Now, on the main form, I want a submit button that will call a public method of each "subForm" that was added at runtime.
I have tried various forms of Control C = This.Page.Master.FindControl("cpBody").Findcontrol("ctl01")... etc, but can never seen to get the right combination.
I am sure more info
I have a challenge whereby a non sa user needs to be able to GRANT and REVOKE a fixed set of perms to SQL Login accounts that exist on a server as follows
Declare @usrlogin VARCHAR(255)
-- Grant the perms
EXEC master..sp_addsrvrolemember @loginame = @usrlogin, @rolename = N'bulkadmin'
EXEC sp_addrolemember @rolename = 'db_ddladmin', @membername = @usrlogin
EXEC sp_addrolemember @rolename = 'db_datawriter', @membername = @usrlogin
GRANT DELETE TO [@usrlogin]
GRANT EXECUTE TO [@usrlogin]
GRANT INSERT TO [@usrlogin]
-- Revoke the perms