Click here to Skip to main content
16,015,077 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Selecting a dropdownlist value in gridview edit mode Pin
Brendan Vogt9-Jul-08 0:26
Brendan Vogt9-Jul-08 0:26 
GeneralRe: Selecting a dropdownlist value in gridview edit mode Pin
eyeseetee9-Jul-08 0:38
eyeseetee9-Jul-08 0:38 
QuestionHow to make query string as read only. Pin
BalasubramanianK8-Jul-08 21:40
BalasubramanianK8-Jul-08 21:40 
AnswerRe: How to make query string as read only. Pin
eyeseetee8-Jul-08 22:22
eyeseetee8-Jul-08 22:22 
GeneralRe: How to make query string as read only. Pin
BalasubramanianK8-Jul-08 22:35
BalasubramanianK8-Jul-08 22:35 
GeneralRe: How to make query string as read only. Pin
BalasubramanianK8-Jul-08 22:51
BalasubramanianK8-Jul-08 22:51 
GeneralRe: How to make query string as read only. Pin
eyeseetee8-Jul-08 22:54
eyeseetee8-Jul-08 22:54 
AnswerRe: How to make query string as read only. Pin
N a v a n e e t h8-Jul-08 23:05
N a v a n e e t h8-Jul-08 23:05 
BalasubramanianK wrote:
Now, 'A' can access the page by giving other User's Id after entering into this page. I want to make that address bar as read only after loading this page.


You can't make the address bar read only as ASP.NET don't have any control over the programs installed on the client machine. Your best bet is to validate the query string before processing.

I assume you are keeping currently logged in users id in session named "id". So in the page load check current user is authorized to see this page, something like
if(Session["id"] != NULL && Session["id"].ToString() != Request.QueryString["id"])
{
   Response.Redirect("NotAuthorized.aspx");
}
The above code will redirect to "NotAuthorized.aspx" if the id passed is not the current user. So user "A" can't pass some other id to see their details.

If you have many pages like this, I would prefer to create a base class and derive all your pages from it. So the checking can be automated.

All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia

How to use google | Ask smart questions

Questionproblem in Active director multiple domain for search user Pin
Piyush Vardhan Singh8-Jul-08 21:36
Piyush Vardhan Singh8-Jul-08 21:36 
QuestionHow to sort string-based numeric data?? Pin
Nada Adel8-Jul-08 21:10
Nada Adel8-Jul-08 21:10 
AnswerRe: How to sort string-based numeric data?? Pin
eyeseetee8-Jul-08 21:25
eyeseetee8-Jul-08 21:25 
GeneralRe: How to sort string-based numeric data?? Pin
Nada Adel8-Jul-08 21:30
Nada Adel8-Jul-08 21:30 
GeneralRe: How to sort string-based numeric data?? Pin
eyeseetee8-Jul-08 21:39
eyeseetee8-Jul-08 21:39 
GeneralRe: How to sort string-based numeric data?? Pin
eyeseetee8-Jul-08 22:25
eyeseetee8-Jul-08 22:25 
AnswerRe: How to sort string-based numeric data?? Pin
Sherin Iranimose8-Jul-08 21:28
Sherin Iranimose8-Jul-08 21:28 
GeneralRe: How to sort string-based numeric data?? Pin
Nada Adel8-Jul-08 21:48
Nada Adel8-Jul-08 21:48 
GeneralRe: How to sort string-based numeric data?? Pin
Ashfield8-Jul-08 22:31
Ashfield8-Jul-08 22:31 
GeneralRe: How to sort string-based numeric data?? Pin
Sherin Iranimose8-Jul-08 22:35
Sherin Iranimose8-Jul-08 22:35 
GeneralRe: How to sort string-based numeric data?? Pin
Sherin Iranimose8-Jul-08 22:34
Sherin Iranimose8-Jul-08 22:34 
GeneralRe: How to sort string-based numeric data?? Pin
Nada Adel9-Jul-08 0:40
Nada Adel9-Jul-08 0:40 
GeneralRe: How to sort string-based numeric data?? Pin
Ashfield9-Jul-08 9:37
Ashfield9-Jul-08 9:37 
GeneralRe: How to sort string-based numeric data?? Pin
N a v a n e e t h8-Jul-08 22:40
N a v a n e e t h8-Jul-08 22:40 
QuestionHow to bind a gridview from a popup window?? Pin
Nada Adel8-Jul-08 20:55
Nada Adel8-Jul-08 20:55 
AnswerRe: How to bind a gridview from a popup window?? Pin
eyeseetee8-Jul-08 21:35
eyeseetee8-Jul-08 21:35 
GeneralRe: How to bind a gridview from a popup window?? Pin
Nada Adel8-Jul-08 21:46
Nada Adel8-Jul-08 21:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.