Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Visibility of added content to other users

Hi,

I created a hyper link control with ID "H1". Its navigateUrl property and Text Property are set at run time, when user clicks ADD button.
The problem is that my application has roles. So user in role 'Instructor' will
set the url property and Text property of the hyperlink on "course.aspx" form and it is visible.
Following is the code:-
private void btnAdd_Click(object sender, System.EventArgs e)
{

H1.ID = nextID.ToString();

H1.Text = txtUrl.Text;
H1.NavigateUrl = txtUrl.Text;
H1.Visible = true;
//Panel1.Controls.Add(H1);

nextID += 1; // so the next one is plus 1, and so on
}
The problem is that when user in role "student" logins, the added url is not visible to him when he visits the same form "course.aspx".

Actually I created a datagrid with two columns "Courses" and "links"(hyperlink column).
example:
courses links
CRS235 Courses.aspx

both users, students and instructors can click on course link (Courses.aspx)
.Instructor is able to add new URL, but next time when instructor or student logins again/ re-visits "Course.aspx" , URL which is previously set is not visible. So, what should be done, so that added URL is visible?.

What I am trying to achieve in short is "when Instructor adds a URL of course documents. That should be visible to students as well as any other user who visits that page".

Any suggestions?

Thanks,
Srinivas
[1544 byte] By [srinivasc_it] at [2007-11-11 10:29:38]
# 1 Re: Visibility of added content to other users
How are you saving the hyperlinks between executions of the app? I would use a database: When the instructor adds a course, save it to the database, then display the list of courses from the database.
Phil Weber at 2007-11-11 23:11:50 >
# 2 Re: Visibility of added content to other users
Oh ok , I was not doing that. What I did was when Add button is clicked, the the hyperlinks navigate and text property was set to value suppied in the text box, because of that when page is refershed, the set properties of the URL are gone.
Thanks, now I will store and display them from the database

Thanks,
Srinivas
srinivasc_it at 2007-11-11 23:12:46 >