|
|
Hi all,
I started with an intranet site for our company, so I'm using windows authentication for the site access. I had a look at the configuration tool provided in Visual Studio 2005 and added the roles of administrator, editor and browser.
The idea is that the users will default to browsers role, so they will only be able to view the intranet site, but I want to assign different access levels for the managers of the departments, that is why I have administrator and editor. So the managers of the departments will be able to edit the content of their departments but not of the other departments, and the rest of the department will only have browse capability.
So my question is how do I assign those specific users those roles?
Thanks in advance
No matter how long he who laughs last laughs, he who laughs first has a head start!
|
|
|
|
|
Hi friends,
How to refresh panel control in asp.net2.0.I have to refresh only the panel control not the page only panel control........
kirankumar
|
|
|
|
|
You have to add this panel control into ASP.NET Ajax Update Panel.
For more ~ ASP.NET Ajax[^]
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Use Javascript like something below.
Assuming you need to update a button with id "TestButton"
document.getElementById("TestButton").Value = "TestData";
If you require it to be more complex operation you will heva to use the XMLHttp object to retrieve value and use JS to update the control.
Thank you
Laddie
|
|
|
|
|
we want to load images to our web page at the time when we scroll down . because there may be 100-1000
images .so loading all the images all together id inefficient.
thanks
jophin
|
|
|
|
|
Ajax to the rescue. You've to track the page scroll (or control scroll) event and load the picture if the scroll value exceeds a given height.
SG
|
|
|
|
|
Hi,
Hope every one is fine. I am developing a website using ASP.NET 1.1. My site is working fine in Internet Explorer but when i run it on Firefox the alignment of controls changes and site looks deshaped...further more if i run it on NetScape only the login page is displayed and when i login every thing goes blank, no page or control is displayed.
Kindly tell me what is the reason of this problem and how to overcome it? Somebody told me that there is a option in properties of project which enables site to be displayed same on every browser, can any one tell me where is that option?
Thanks in advance,
Regards,
Affan Ahmad Toor
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
|
|
|
|
|
Basically, the different browsers render different CSS differently. You need to work through each issue in your site and find ways to lay it out that work with all browsers. Welcome to hell, sorry.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks for reply,
I hope i am not alone in hell...can you direct me from where to start, i am trying and trying and trying but found no solution. what kind of changes i should make in CSS to make it work on every browser...?
any kind of help is appriciated...
Regards,
Affan Ahmad Toor
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
|
|
|
|
|
How to reorder the columns of a databound gridView in run time
|
|
|
|
|
There is nothing built in to do that, you'd have to do it with javascript. Of course, a gridview is a server side construct, it's just spitting out a table on the client end.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have created a textbox on button click event :
<code>
protected void btnCreateTextBox_Click(object sender, EventArgs e)
{
TextBox txtDynamic = new TextBox();
txtDynamic.ID = "txtDynamic";
pnlContainer.Controls.Add(txtDynamic);
}
</code>
and when the page loads, i click on the button to load the textbox at runtime, it works fine.
The problem in in fetching the value of the textbox when the user clicks on the "save" button.
I am trying this, but it doesnt works. Since after the postback, there is NO existence of the runtime textbox.
<code>
protected void btnSaveTextBox_Click(object sender, EventArgs e)
{
Response.Write(GetDynamicTextValue());
}
private string GetDynamicTextValue()
{
foreach (Control ctrl in pnlContainer.Controls)
{
if (ctrl.GetType() == typeof(TextBox))
{
return ((TextBox)ctrl).Text;
}
}
return string.Empty;
}
</code>
Here is body of my aspx page
<code>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID=btnCreateTextBox runat=server Text=Create OnClick="btnCreateTextBox_Click" />
<asp:Panel ID=pnlContainer runat=server></asp:Panel>
<asp:Button ID=btnSaveTextBox runat=server Text=Save OnClick="btnSaveTextBox_Click" />
</div>
</form>
</body>
I understand the problem is related to page life cycle, but am not being able to resolve it.
Could somebody please explain me the same OR write the "GetDynamicTextValue()" method for me.
Any help/referrence/discussion will be of real help. Am really stucked into an application that needs this utility.
Thanks a lot for reading.
</code>
|
|
|
|
|
Try the following code ~
ArrayList al = new ArrayList ();<br />
protected void Page_Load(object sender, EventArgs e)<br />
{ <br />
if ( !Page.IsPostBack )<br />
{<br />
Cache["myCtls"] = "";<br />
}<br />
else<br />
{<br />
if ( Cache["myCtls"].ToString() != "" )<br />
{<br />
try<br />
{<br />
al = (ArrayList)Cache["myCtls"]; <br />
foreach ( object o in al )<br />
{<br />
if ( o.GetType () == typeof (TextBox) )<br />
{<br />
TextBox txt = (TextBox)o;<br />
<br />
pnlContainer.Controls.Add (txt);<br />
}<br />
}<br />
}<br />
catch ( Exception ex )<br />
{<br />
Console.WriteLine ("Why?? Why? babe!" + ex.Message);<br />
}<br />
}<br />
}<br />
<br />
}<br />
protected void btnCreateTextBox_Click(object sender, EventArgs e)<br />
{<br />
TextBox txtDynamic = new TextBox ();<br />
txtDynamic.ID = "txtDynamic" + al.Count ;<br />
pnlContainer.Controls.Add (txtDynamic);<br />
al.Add(txtDynamic);<br />
Cache["myCtls"] = al;<br />
}<br />
protected void btnSaveTextBox_Click(object sender, EventArgs e)<br />
{<br />
Response.Write (GetDynamicTextValue ());<br />
}<br />
<br />
private string GetDynamicTextValue()<br />
{<br />
string str = string.Empty;<br />
foreach ( object o in al )<br />
{<br />
if ( o.GetType () == typeof (TextBox) )<br />
{<br />
str = str + ((TextBox)o).Text;<br />
}<br />
}<br />
return str;<br />
}
I have tested in my side and it works well...
Hope it helps.....
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Thanks a lot for the reply.
I understand what the code is doing is, its loading the textbox again in each page load so as to keep its existence thru the round trips. The solution is perfectly fine but i didnt wanted that to happen.
I dont want to reload the textbox once the "save" button is clicked.
To be pertinent, I want to know is there a way to "manuallly" catch the values stored in the PostBackData... i know abt _doPostback event, but then how to write a "generic" method which can keep track on the values of a desired control. [ ]
|
|
|
|
|
hi all,
I am developing a web application using asp.net 2.0 with VB.
I need to do Page output Caching for my page.
I am using both client and server controls in my page.
I need to cache the whole page for particular time period .
I have a HTML table in my page.I need to Cache the data in the HTML table also.
could anyone give me solution for this??
How can i Cache my whole page data including HTML table using the Page Output Caching Concept.
Thanks all in Advance.
Regards,
Senthilraj K
|
|
|
|
|
If you know exactly what to search for, why don't you? There are a lot of excellent tutorials and examples available already.
Search[^]
The answer to this kind of questions is better found in the material that is already available. If you have some more specific questions, those are better suited to be asked in a forum.
---
single minded; short sighted; long gone;
|
|
|
|
|
I have a website that is built in Front page, there over 50 pages, each built individually, so if I want to change the backl ground logo etc each page has to be changed, (huge task)
What I would like is a template for the front page that has the logo and contents list, background colour, and some code so that when it looks for another page the logo, contents and colour comes up automatically on that page.....
I am a novis when it comes to code, so was wondering if anyone could help..... I have googled for free templates and seen some that I like, but its the code bit I'm lost on
Regards
Duncan Halford
Website is www.ukcoldwar.org.uk
|
|
|
|
|
Have a look at master pages in the MSDN.
|
|
|
|
|
Hi
I have quiz project running online. and i am using sql server 2005 as backend. The controls i am using to show questions is detailsview. I need to show questions in random order. I don't know how to do it. If somebody knows pls tell me. I am in great trouble.
|
|
|
|
|
to select the records in random order, you can use "order by NewId()" in the select statement. something like this
select * from tblQuestions order by NewID()
bind the resultant set to the grid view
Regards John
|
|
|
|
|
Use , NewID()
Never Think That You Have Failed Instead Always Think That u hav Better Chance Next Time...
|
|
|
|
|
Another way to do that is to load the questions into a datatable. Create an integer array from 0 to datatable row count. Then use the Fisher-Yates algorithm to shuffle the array. Clone the original datatable and then load rows into the cloned datatable using the order of the shuffled array. Alternatively you could have a question order field in the question database and shuffle the numbers in the datatable. Finally bind the datatable to the detailsview grid. Cheers.
Mike Rehner
IT Teacher
Northeast Career Center
Columbus OH 43219
|
|
|
|
|
what will be the regex that doesn't allow < > tags?
regards
Dom
|
|
|
|
|
Your question is a bit vauge, so I don't know exactly what you want. Perhaps this:
The pattern "^[^<>]$" matches a string that doesn't contain either < or >.
---
single minded; short sighted; long gone;
|
|
|
|