|
when trying to login from Logon page it is loging and going to master page and in the Master page different hyperlinks, when i click on any link it is redirected to Logon page.
<b>Login Page btnlogin click code</b>
if (DatabaseLayer.AdminDAO.UserExists(txtUserName.Text, txtPassword.Text))
{
FormsAuthentication.SetAuthCookie(txtUserName.Text, false);
Server.Transfer("~/Admin/Presentation Layer/MainPage.aspx");
}
else
{
Page page = HttpContext.Current.Handler as Page;
if (page != null)
{
page.ClientScript.RegisterStartupScript(page.GetType(), "msgbox", "alert('Sorry ! Your Login Failed');", true);
}
}
<b>Web.config Code</b>
<authentication mode="Forms">
<forms name="appNameAuth" path="./Admin/" loginurl="./Admin/Admin.aspx" protection="All" timeout="30">
</forms>
</authentication>
<authorization>
<deny users="?" >
<authorization>
<b>Main Page One Hyper Link</b>
<asp:hyperlink id="HyperLink15" runat="server" navigateurl="~/Admin/Presentation Layer/News.aspx" xmlns:asp="#unknown">News</asp:hyperlink><br />
While clicking any of the Hyper Links it is redirecting to Logon Page.
|
|
|
|
|
Hi,
I am following one MVC built in my organization but i am not happy with its performance.I need to change it.So please suggest me any mvc with good performance.
|
|
|
|
|
Hi,
what do you mean by MVC? Do you mean the model-view-controller architecture?
If you search a framework implementing/supporting the mvc-paradigma have a look a the ASP.NET MVC http://www.asp.net/mvc/[^].
Regards
Sebastian
|
|
|
|
|
Yes i here MVC is for model-view-controller
|
|
|
|
|
Ok. What is your issue? Is ASP.NET MVC not performing well for you?
|
|
|
|
|
Ya,MVC which one i m using is not performing well,so i need to change it
|
|
|
|
|
So you are using ASP.NET MVC? MVC is just a design pattern, there are lots of frameworks out there to help you using this pattern. You could also try to rewrite your application according to your needs using the MVC pattern.
|
|
|
|
|
Hellow all,
how to upload image in php code i know i am sending on wrong forum but kindly guide me i only trust on code project experts
Thanks in advance.
|
|
|
|
|
Code Project already has PHP forum. you can post this question in PHP Forum[^].
|
|
|
|
|
Hi friends ,
i need coding for login page that checks user name and password from database table. i search from google but i can t find satisfactory answer. plz send me coding if anyone knows
|
|
|
|
|
Hi,
you r using built in login control or making your own custom login
|
|
|
|
|
hi nidhi sorry im not able to understand what u say
|
|
|
|
|
Hi,
We can use login in two way.
1. use built in login control of asp.net.
2. Create one html form where we keep 2 fields,login and password and then check it from database.
So what do you want to follow.
|
|
|
|
|
Jas 007 wrote: Hi friends ,
i need coding for login page that checks user name and password from database table. i search from google but i can t find satisfactory answer
I have already suggested you to buy a Beginners's Book before asking this type of question . Check Here[^]
Jas 007 wrote: search from google but i can t find satisfactory answer.
What kind of answer do you expect ?
I have searched google and Got This[^]
Jas 007 wrote: plz send me coding if anyone knows
This does't help you to learn .
|
|
|
|
|
|
web user control will be helpfull for you create a user control and add in your page where ever you want....
umerumerumer
|
|
|
|
|
Dear friends,
How can I destroy a variable in ASP.Net(C#).
If anybody knows, please answer
Regards
Shivan
Shivanandan C V
|
|
|
|
|
Assign null value to the variable .
int i ;
i=10;
i=null ;
|
|
|
|
|
Nishant Singh wrote: int i ;
i=10;
i=null ; //destroy variable
Wrong. This will not compile. int can't have NULL value.
|
|
|
|
|
i think variables are destroy after there scope is complete....
function ()
{
var a;
}---->here.
why you need to destroy it??
umerumerumer
|
|
|
|
|
I am using dataTable to temporarily display data in GridView.So in my function I wrote code for adding fields and records.
Then while running it for the second time, it displays error that column name already exists.
So I think that the datatable is not getting cleared while stopping the program.
Shivanandan C V
|
|
|
|
|
How this data table object is declared? Looks like you have incorrectly declared the data table.
|
|
|
|
|
I have declared it as
static DataTable dtMainTask = new DataTable();
Shivanandan C V
|
|
|
|
|
Shivan Nandan wrote: static
This is the problem. Do you know what is the scope for a static variable? It lives until the application domain unloads. BTW, is there any specific reason for declaring it as static?
|
|
|
|
|
If I didnt declare it as static, then its value becomes empty in another function.
ie,
I declared it outside all the function ,
In Page_PreInit - declared the fields,
In btnAdd_Click - wrote function to add rows
Therefor if I didnt declare it as static then the fields are not accessible in btnAdd_Click function.
Shivanandan C V
|
|
|
|