3
Answers

hello, I have buttons in my master page that allow users to nevigate in the site without log in. I...

s

s

12y
3.2k
1
hello,  I have buttons in my master page that allow users to nevigate in the site without log in.  I aso have a shopping cart page and I want to check if the user is log in or not once the user click on button to select products.  how can I do it?
 I've tried   if (HttpContext.Current.User.Identity.IsAuthenticated) Response.Redirect("~/CheckOut.aspx"); else Response.Redirect("~/Login.aspx", true);  
and it doesnt work.
 thanks.

p.s
what I mean is something like this site - if you want to write a post and you are not loged in it's redirect you to the login page.
Answers (3)
0
Kirtan Patel
NA 35k 2.8m 15y
Suppose you haveing Project A and Project B

then in Solution Explorer Right Click Project A and >>> Add Reference >> Project Tab >> select Project and Click ok
 





then you can call Another Project's Form like below Code

here i m calling Application19 's form in Load Event of Application18 Form1

 private void Form1_Load(object sender, EventArgs e)

        {

            WindowsFormsApplication19.Form1 f1 = new WindowsFormsApplication19.Form1();

            f1.Show();

        }


check "Do you like this answer" of it helpes you :)


Accepted
0
jinge
NA 2.4k 23.5k 15y

Hello guy,
 
If you want to see the form in Design time, just double click the Form node in the solution explorer.
 
If you want to show the form in runtime, then you can instantiate a new instance of that form, and invoke Show or ShowDialog method of that object to open this form
 
Let me know if it helps.
0
naura pax
NA 1.9k 64.8k 15y

hi,
You'll first have to add reference of the new project in your existing project by right clicking on existing window project in solution explorer and selecting add reference.
Then you can just call formName.Show/ShowDialog method, but don't forget to use namespace of new project.