Actually I have one login page where when I validate the user it let me show Default page. In that page I have some pages listed.I want to give access of different pages to different users based on their roles. I am not using membership and roles provider by going into ASP.Net configuration tab and creating roles and users over there. I have two tables users and roles already in my sql server database. Once after validating the users and getting Default page how can I make sure that e'g if the user is admin he has access to just administration page wwwand sales person has access to only sales.aspx page etc
hahii
Posts
-
mebership -
check if record existWhat is the best way to check for a record exists in a database using linq to sql? I want to check if a userid (int) and typeid (int) exist. - The following code always returns zero even if the record exists - what is the best approach? int result = 0 result = (from t in context.customers where ((t.userid == intUserID) && (t.typeid == intTypeID)) select t).Count();
-
publish web siteYes, I created the virtual folder. e.g my website is in the folder C:\project\NyWebSite Now I treated virtual folder in C:\Project and named it as test2. But when I go to window explorer C:\project my test2 is not there. So,. How can I publish it. I have no idea where I am doing wrong
-
publish web siteHi, I created a Virtual directory for my web site. Now I want to publish it at http;//localhost/test2. How can I do that.
-
Authenticate usersHow to Authenticate Users with the SQL Server database table. I am using ling to entity data model.
-
Insert statement (please read again.)have two tables. Roles and Users. In Roles I have three columns iID(PK), Role(varchar), Description(varchar). In User table I have columns ID(PK,FK), Username(varchar), Password(varchar), Role(int). First I fill data in Roles table then now I am trying to insert data in User table it is giving me following error. Msg 547, Level 16, State 0, Line 1 The INSERT statement conflicted with the FOREIGN KEY constraint "FK_User_Role". The conflict occurred in database "DataFeed", table "dbo.Role", column 'Id'. The statement has been terminated.
-
login controlsHi, I am using Login control in my login.aspx page. I have a user table in my sql databas where user name and password are stored. After filling username and password in login page I want to check if it matches with the username and password with the data in the user table. How can I do that. Regards,
-
Insert into tableI have two tables. Roles and Users. In Roles I have three columns iID(PK
-
membership and RolesHi, I am using membership and roles to secure my web site. Instead of creating data base in APP folder I want to excess my tables named Users and Roles into my sql server database. How can Ido that. Regards,
-
Login ContorlsI want to use the login Controls on Users That are in My SQL Server database user table. How do I authenticate user based on the users table in SQL Server? I don't want to use Stored procedures also. I am using Linq to entity database. Thanks.
-
Grid ViewHi, I have a GridView in My page. I attach a DataSource with it. But Some fields name in my table are large. So, how can I set the width of each column of my Gridview dynamically depending on the column name's length in my data tables.
-
Detail ViewHi I have a GridView and Detail View in my linqform.aspx page. When I run it it gives me following error. Compiler Error Message: CS1061: 'ASP.linqform_aspx' does not contain a definition for 'DetailsView1_ItemUpdated' and no extension method 'DetailsView1_ItemUpdated' accepting a first argument of type 'ASP.linqform_aspx' could be found (are you missing a using directive or an assembly reference?) ; ; <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />;
-
Linq QueriesActually I am very new to Linq. But I have a project where I have to use linq to entities. I have a Gridview in my aspx page and I have a table named Address with 6 columns. I have to bound this Gridview with data from table and I have to delete, update and insert new records using linq quiereies. How can I do that. I really appreciate that. Regards,
-
Linq QueriesActually I am very new to Linq. But I have a project where I have to use linq to entities. I have a Gridview in my aspx page and I have a table named Address with 6 columns. I have to bound this Gridview with data from table and I have to delete, update and insert new records using linq quiereies. How can I do that. I really appreciate that. Regards,
-
Select all the records with Linq QueryHi, I have a table named "Customers" which has 6 columns with 15 rows. I want to show all athe records in Gridview using linq quieries. I am using this query but it is not giving me all the records. How can I show all the records in Gridview. var type = (from p in entities.Customers select p) this.Gridview1.DataSource = type; this.GridView1.DataBind();
-
Linq query to get all the recordsHi, I have a table named "Customers" which has 6 columns with 15 rows. I want to show all athe records in Gridview using linq quieries. I am using this query but it is not giving me all the records. How can I show all the records in Gridview. var type = (from p in entities.Customers select p) this.Gridview1.DataSource = type; this.GridView1.DataBind();
-
Tree viewI have a tree view in my page. I want to show the name of of selected node along with it's parent node. I am using the folleing event. I want my text of lable like follwing when I click child node aaa AA--> aaa. Where AA is parent node's text and aaa is child node's text. I don't want to use Sitemappath.
-
Grid viewCan u please send me a sample for Grid view where I have a column where I can edit, delete and insert data in Gridview.
-
DataBindingI have the following coding in my web form. var type = (from p in entities.Address select p); this.GridView2.DataSource = type; this.GridView2.DataBind(); Here in table Address I have one column named "Status" which is foreign Key. When I selected all the columns and try to bind with GridView it is not showing that column which is forign key. What is the reason. Thanks
-
problem while binding the data with gridviewNo it doesn't solve my problem when I remove public static from my code