DataSource Controls :: Access To Page Based On Creator?

Jun 21, 2010

I want the creator of a row in the database to be able to enter and edit as well as members of a certain group, i have this string of data for the final part.

string isRsoString = Session["isRsoAdmin"].ToString();
if (isRsoString == "0")
{
Response.Redirect("Default.aspx?status=noaccess");

How do i get it to check if its the creator of the row? the creators username is stored in the table under the column RequesterName

View 5 Replies


Similar Messages:

Forms Data Controls :: Select A Radio Button When Page Loads Based On RadioButtonList's DataSource

Feb 20, 2010

On my web form, I have a RadioButtonList as follows:

Select a radio button when page loads based on RadioButtonList's DataSource

View 2 Replies

Web Forms :: Role Based Authorization And Page Access Using Session?

Jun 16, 2015

i am developing the web application in Asp.net i hav many .aspx pages in the project some of belongs to Admin and some some of to Customer so how can i divide that and how to access admin pages to admin login and customer pages to customer login.  

View 1 Replies

VS 2008 - Restricting Access To Web Pages (on Intranet Site) Based On Role Based Authorization

Jul 12, 2011

I have a simple intranet site. It has a role based authorization in the web.config file.

Any user's in a specific role called as "Apr-Sales-Writers" will be authorized to use those pages. If not, they will not be authorized. So far so good. Works fine. But we added additional functionality where a new active directory group (means new role) has to be added and user's belonging to this new AD group should be given access to only specific .aspx pages on the intranet site. I am using a web.sitemap and it looks like this.

If the user's belong to say AD group "Apr-Sales-Writers", they should access only default.aspx and salesData.aspx pages. User's belonging to new AD group (which I did not include in the web.config file below), should have access to other .aspx pages.

[CODE]<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="default.aspx" title="Home" description="Home">
<siteMapNode title="sales Data" description="sales Data">
<siteMapNode url="salesData.aspx" title="sales Data" description="sales Data" />

[Code] ....

View 7 Replies

How To Create A Survey Creator Webform

Mar 16, 2011

I wondered how the more experienced .netters out there would go about creating something whereby users could create online surveys? I can't get my head around it at the moment as I have my survey object but need to store different object types of questions within it. Also does anyone think that creating some custom controls could be the way to go? (survey question controls)

View 5 Replies

C# - Online Timetable Creator Which Takes The Information From Different Schools?

Oct 19, 2010

I wanna build an online project by using ASP.NET ,It is an online timetable creator which takes the information from different schools , stored them in a DB then build a timetabel object for each school.first: what type of a website/project should i use in visual sudio 2010?second: how i can store the timetabel object -that made from C# class- and make reference to its school row in a DB?

View 3 Replies

DataSource Controls :: How To Access Database Once With Big Resultset Or Access Multiple Times On The Fly

Jun 17, 2010

I have a situation where I am accessing a database multiple times and I'm wondering if it is necessary.

I have a GridView with a template column with a hyperlink to "Get Results" and on the RowDataBound event I have it check the batch number against the database and see if results exist and then if they don't, hide the link.

So when viewing the page if there is 20 rows in the gridview it is effectively doing 20 queries.

I was wondering if it is a better idea to query the database once with all "batches" and load it into a datatable, then on the RowDataBound event query the datatable. The only issue I see with this is there is currently 40,000 batches and grows daily.

View 1 Replies

Security :: Auto User-profile Creator And Username Validation?

Apr 10, 2010

I'm trying to add two features to my website using the microsoft built-in login features. One feature I want to change is the validation of the username. By default, it allows pretty much any characters for the username. However, I want to make it so that only alphanumeric characters, and spaces. Also, I want to make it so that usernames MUST begin with a letter. I'm not entirely sure how to do this, In addition, I want to configure it so that once an account is created, a file /users/(their username)/(their username).aspx created once they are authenticated, with the master page set to userProfileMaster.master

View 5 Replies

Security :: Custom Access Denied Page For Role Based Security?

Oct 27, 2010

I have implemented role based security in my asp.net 2.0 vb.net application using windows authentication and the windowstokenroleprovider and limiting access to certain pages using the location tag to specific active directory groups.

The issue is that when a user tries to access a page they are not authorized to view it brings up a login prompt and when it does not pass it takes them to the default page that tells them they are not authorized to view the page. I am wondering if there is a way to throw up a custom page that tells them they are not athorized to view the page that I can incorporate into the site itself with the header and so forth? if this page could come up in lieu of the sign in box popping up as well.

View 2 Replies

DataSource Controls :: Access Property Of Object As Session Variable As Declarative Datasource Parameter Value

Oct 27, 2010

I am storing a custom "Organisation" object as a session variable. One of the properties of the Organisation object is "OrganisationID" (integer). I have a DataSource that requires a parameter value to run, and I want to use a SessionParameter to populate this. In a previous version, I stored the OrganisationID directly as a session variable. In that case, I could easily access it like this:

[Code]....

However, how do I now access the OrganisationID property of an "Organisation" type session variable (called "Organisation")? I have tried this, which does not seem to work: <asp:SessionParameter Name="OrganisationID" SessionField="Organisation.OrganisationID" Type="Int32" />

View 2 Replies

Forms Data Controls :: Show Columns In Gridview Based On Access Rights?

Feb 3, 2011

I want to show columns in gridview based on access rights/roles.That is i want to show parents column if there is parents login or else i want to show students column if there is students login.

View 2 Replies

DataSource Controls :: What Is Best Way To Lookup A Value Based On Two Other Values

May 15, 2010

I have a database table with three columns of interest

slottypekey (integer)

taskkey (integer)

permission (string)

Lets's say I have a stored procedure that gets this data and puts it into a dataset.

I would like to write a function that has input parameters of slottypekey and taskkey

and that returns the associated permission. What is the best way to do this?

View 4 Replies

DataSource Controls :: Build Output Based On Data

May 24, 2010

This is my Table Structure....

OrderNo Itemcode Name AQty BQty

AB1 001 A 50 60
AB1 002 B 50 50
AB1 003 C 50 40
AB1 004 D 100 120
AB1 005 E 100 100
AB1 006 F 100 80
AB2 007 B 100 95

I need The first resultset/Output like This....

OrderNo Itemcode Name AQty BQty Total

AB1 001 A 50 60 -10
AB1 004 D 100 120 -20

I need The Second resultset/Output like This....

OrderNo Itemcode Name AQty BQty Total
AB1 003 C 50 40 10
AB1 006 F 100 80 20
AB2 007 B 100 95 05

I dont need To show 002,005 coz itz Total is zero(0). Herr i need to show Record Based on OrderNo...

View 4 Replies

DataSource Controls :: Linqtosql Contains Based Off Words In Textbox

Mar 22, 2010

I am probably doing this wrong but I want to take all words entered in to a text box and return all records that contain any or all of the words. Can any one point me in the right direction?

protected void ldsGvFaqs_Selecting(object sender, LinqDataSourceSelectEventArgs e)
{
if (txbSearch.Text.Length > 0)
{
string temp = string.Empty;
string[] words = txbSearch.Text.Split(' ');
int counter = words.Length;
foreach (var word in words)
{
temp += "Tags.Contains('" + word + "')";
counter -= 1;
if (counter > 0)
{
temp += " || ";
}
}
ldsGvFaqs.Where = temp;
}
}

But I get the following error, Character literal must contain exactly one character.

View 2 Replies

DataSource Controls :: How To Merge Two Table Based On SQL Query

Jun 7, 2010

This is my table stucture...

This is first table...

ItemNo refno Process Name Qty
001 1 A John 50
001 2 A Jon 150
002 3 B
Kalis 100
003 4 A
Bob 300
Second Table
ItemNo Newrefno Process Name Qty
001 001 ZZ peter 50
001 001/a ZkZ Joe 70
002 002 Ab Ray 100
Result Set
001 A John 200 001/a ZZ ZkZ peter joe 50 70
002 B
Kalis 100 002 Ab Null Ray Null 100 Null
003 A
Bob 300 null null null null null null null

Here first row of the result set explanation:

up to this 001 A John 200 based on first table sum...

and 001/a zz ZkZ peter joe 50 70

here 001/a newrefno of 001 so i need to show all the ItemNo 001 record in one row like the above resultset.

View 4 Replies

DataSource Controls :: Adding An Id Field Based On Other Fields

May 16, 2010

ive a DB in access with a single table and no primary key, actually i dont need a primary key but i can consider a date field plus another to make an index. however i want to add a counter field based on every change of date field, for instance ill have many records of 20/May and all must have the same id then when the date is different, the next group of records with that new date must show 2 etc.. is it a quick way to update my database?

View 6 Replies

DataSource Controls :: Retrieve Data Based On Years?

Jul 8, 2010

I need to retrieve data based on 3 different selections(current year, 5 years, 10 years). If the user select current year, then I need to pull data with the most up to date year, if the user selects 5 years, then I need to pull data for 5 years from the most up to date year in database. I am trying to accomplish this in sql due to using object DataTables in asp.net 3.5. I am able to do this with separate queries but I need to accomplish this with one query. I was going to use CASE statements but not really sure if I am approaching this correctly.

View 9 Replies

DataSource Controls :: Does Not Perform A Session Based SQL Connection?

Mar 4, 2010

(1) "...this application is a very heavy SQL application, it does not perform a session based SQL connection, instead for every request it refers back to the base confirmation file on the web server and then opening or making a new SQL request the result being a very chatty SQL client!"(2)..." concerns specifically relating to the chattiness of the SQL client app. Please be cautious when "testing" the product for it may have a negative effect even on [the] faster WAN links"C. Example of Code(1) from a class helper file:

"
public Product GetProductByName(string name)
{

[code]...

View 4 Replies

DataSource Controls :: GridView To Display The Data Based On One Or The Other?

Apr 5, 2010

I have a web form with two drop downs.I want the gridView to display the data based on one or the other.The user can then select a record to be displayed in a detail view.This method works as long as I am only viewing the data.If the user edits the data in the detail View and then updates the detail view when the page reloads the grid goes blank.I have traced the code and there is data in the query after the update but the select statement for the LinqDataSource is overriding the code in the lqGrid_Selecting.I can make the above scenario work using SqlDataSources,but I thought LinqDataSources were the way of the future.

[code]...

View 1 Replies

DataSource Controls :: LinqDataSource In A N-Tier Web Based Application?

Mar 10, 2010

I am upgrading and re designing my current ASP.NET 2.0 website to ASP.NET 3.5 to take advantage of the 3.5 feature set.As part of the re design I am going to use Linq to SQL classes.

The web based application I am working on is an N-Tier application. In the past I have always used an ObjectDataSource when binding against UI controls.I just read an article about the LinqDataSource.After reading this article I am toying with the idea of using the LinqDataSource for selecting data into controls where I only want to select and not change the data (i.e. drop down list boxes or gridviews that don't perform inserts,updates or deletes).Before I go down this path,I was wondering if this is a bad idea and that I should just stick with the ObjectDataSource?

View 7 Replies

DataSource Controls :: Selecting All Data From A Table Based On Some Given Conditions?

Jul 8, 2010

I am having a staff table which contain staff information on it. To search staff information from the table, I want to prefer filter style. For example in the select query I want to display staff information according to three criterias. Select staff information from all sections, Select staff information from a given section, select staff information by a given Name. All these selects must be performed in a single select statement. Suppose,

SELECT * FROM StaffDetailsTbl
WHERE SectionID = CASE WHEN @SectionFilter IS NULL THEN [SELECT ALL]
ELSE SectionID = @SectionFilter
and Name = CASE WHEN @NameFilter IS NULL THEN [SELECT ALL]
ELSE Name Like '%@NameFilter%'

Where Declared variables are parameterized stored procedure values retrieved from the user.

View 2 Replies

DataSource Controls :: Filtering / Selecting Rows Based On Date?

Aug 26, 2010

I have a gridview, based on thsi datasource:

[Code]....

Using a dropdownlist, I can filter (by changing datasource) the results based on customer names in a dropdownlist. This datasource, working perfectly, looks like this:

[Code]....

Now, using a textbox and a ajax calendar, I would like to be able to filter on the date as well, but my datasource so far:

[Code]....

doesn't work very good. In some case sit doesnt show anything, in onther situations - with 10 records for a given date, it only shows one.

Question one: How do I make the last datasource work? Its probably - again-again - something with the datetime formats, but for the life of me, I can't see how to do.

Question two: The Ideal solution would be using the first datasource, SqlDataSourceAllLoads, and then be able to filter the results with filterexpressions/parameters, but again, how? The filterparameters would origin from a DropDownListKunder, matching the tblDeliveredInfo.deliveryInfo_FirmaNavn as seen in the second datasource, while the date comes from the textbox txtStartDate (databinding fired by a button).

View 3 Replies

DataSource Controls :: Filtering Data Based On Multiple Tables?

Mar 16, 2010

I am writting a directory website that advertises fitness classes. These classes are listed by Class Type, and Geographical Area. Each Class Type can satisfy one or more of four Fitness Goals such as Loose Weight etc...

I have a table for Classes (classid, classname, classdesc, classtypeid, geoareaid) I have a table for geographic areas (geoareaid, geoarea) And I have a table for ClassTypes (classtypeid, classtypename, classtypedesc)

Which obviously links geographic area via the classes.geoareaid as a forgien key and classtypes by classes.classtypeid as a forgien key.

I can list all classes by type and also by geo area no problem, the problem arrises when I then also want to filter by goal.

The Goals Table (goalid, goal, goaldesc) is linked to the classtypes table via another table classtypes_goals (classtypeid, goalid) as each classtype can satisfy any of the 4 goals.

I am using a DataSet to fetch the data from a Stored Procedure in the SQL Database but because the classtypes can be linked to multiple goals I am getting duplication in my list depending on how many goals a classtype satisfies.

All I need in my data list is class name, class type and area I don't even need to display the goal I just want a drop down above the table that will filter the list and show only classes of classtype that satisfy the goal chosen.

View 18 Replies

DataSource Controls :: Returning All Rows Based On One Distinct Column?

May 18, 2010

Here is the query I have now which returns over 2 million records:

[Code]....

This works, but the result is littered with many rows that contain the same SSN. So how do I return only one row for each ssn? I cant use distinct because all of the other columns are already always different, this would return the same as above.

View 11 Replies

DataSource Controls :: How To Compare Two Tables Qty Based On Purchase And Sales

Apr 27, 2010

How To Compare Two Tables Qty Based On Purchase and Sales?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved