|
Can't you implement it as a service that runs on the server?
Cheers,
Mircea
"Pay people peanuts and you get monkeys" - David Ogilvy
|
|
|
|
|
I'm at a loss for ideas- I have a relatively complex application that uses data retreived from Active Directory (compared against an SQL table) to determine user rights. For the administrative web backend, I need a way to search for Active Directory users (by name) from an ASP.NET form. I haven't got a darned clue how to do this, since I'm relatively new to AD integration with web applications.
Can someone help me, or at least point me in the right direction?
|
|
|
|
|
You can use LDAP with DirectorySearcher to find a particular user in AD. You have a lot of articles Link 1[^], Link 2[^], Link 3[^]
|
|
|
|
|
I've just started dabbling in ASP.NET properly and might be missing something obvious here, in this snippet of code:
<asp:Panel ID="panRepresentatives" runat="server" Visible="<%#this.GetDefaultVisible() %>">
<h1>Executive Committee Discipline Representatives</h1>
<asp:Repeater ID="repRepresentatives" runat="server" DataSourceID="dsRepresentatives">
<HeaderTemplate>...</HeaderTemplate>
<ItemTemplate>...</ItemTemplate>
<FooterTemplate>...</FooterTemplate>
</asp:Repeater>
</asp:Panel> What should happen is the panel should not be rendered when there are certain query strings passed to the page. GetDefaultVisible is implemented as such:
protected bool GetDefaultVisible()
{
if ((this.Request.QueryString["position"] == null) && (this.Request.QueryString["id"] == null))
return true;
return false;
} Now above this in the page is another asp:Panel which is always displayed, but inside that is another asp:Repeater control and the visiblity of this is controlled by another method which matches the database Position against the position passed in the query string or the database Id against the query string id . If they match then that particular panel is displayed, otherwise it's hidden.
The hiding / showing of panels is working fine in the code above this snippet but for the provided snippet the call to GetDefaultVisible is not happening at all , by stepping through the code I've verified that GetDefaultVisible is not called from the Visible="..." section of panRepresentatives .
Can anybody see what is wrong? I can provide more code if required but it's tied up in database connectivity and it's not really relevant to the discussion.
|
|
|
|
|
Is there a reason you wouldn't want to do this in the Page_Load event?
protected void Page_Load(object sender, EventArgs e)
{
if ((this.Request.QueryString["position"] == null) && (this.Request.QueryString["id"] == null))
panRepresentatives.Visible = false;
else
panRepresentatives.Visible = true;
}
|
|
|
|
|
I could, perhaps it's just a personal preference but the GetDefaultVisible is actually used by another part of the page (the omitted) part. But I'll try putting a call to it in there and see if anything changes. If it does all well and good but it still doesn't get away from the fact that it should be getting called, even if there is a better way of writing the page .
|
|
|
|
|
You could still do
panRepresentatives.Visible = GetDefaultVisible(); I think the problem is with the Page life cycle of an Asp.Net page. I probably need to sit and think what happens in the page life cycle for the panel. I just had my lunch and really lazy to do it
|
|
|
|
|
That's what I just did, anyway thanks for the help, but I've decided I've approached things the wrong way (generally, in terms of planning for the future). So I'm going to have a sit down and a doodle while watching House and design it properly
|
|
|
|
|
[update]That does work as expected[/update]
I'll use that method for now, but it still doesn't explain why the method isn't called, oddly enough if you copy the Visible="<%#this.GetDefaultVisible() %> " attribute through all the children of the panel then the panel is hidden, but that kind of defeats the purpose of it.
|
|
|
|
|
Hi,
I need a tree control inside a grid control, i.e.., every node of the tree should be a row in the grid control.
I want to implemented this using AJAX. Please let me know how this has to be implemented.
|
|
|
|
|
Why do u want to use tree control in gridview?
U can also implement this without tree control
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
i want to group the contents of the grid in a heirachical manner. So i need a tree inside a grid.
|
|
|
|
|
HI,
I need to create a scroller at the bottom of my web page (Something like stock
market). Even if the User scrolls down or up it should be visible.
Can i make a div tag unhide even after scrolling....
Any suggesions plz.......................
Bala
|
|
|
|
|
Have a look at this webpage [^]you could do a view source on that page to see what kind of javascript they have used. Google for Floating DIV
|
|
|
|
|
HI,
Thank you very much for ur reply. But that div is an ordinary client side one if i use a server DIV tag, it goes to the top of the page
Im using timer(ATLAS/Ajax) for updating the DIV
Any Suggestions.....
Bala
-- modified at 18:34 Thursday 2nd August, 2007
|
|
|
|
|
use two timer for managing page lode. and timer run when text enter in div.then scroll bar work properly on bottom. and use also update panel for the control to manage postback.
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
|
|
|
|
|
write java script for bottom scrollbar on enter key event
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
|
|
|
|
|
I have one major problem. Can anyboday help me ....Here is a problem
1] I want to access my office computer from my notebook. It is working fine. But On my office machine if I connet to a dialup network of my client (which is must to run my application) I dont get connection of the office Pc from my notebook. It says that teh remote computer is busy.
How should I solve the problem.
2]
Is there any live chat avalable to get the support from.
Its Very Very urgent please help
Thanks
|
|
|
|
|
Pls check if remote connection is enabled in ur pc and also find that if firewall is on or any kind of antivirus is blocking ur pc.
Regards
Bino
|
|
|
|
|
Hi, I have a field in my sql database that is populated with a lot of parragraph and line breaks, but when I use DetailsView to display the field I get only a big parragraph, any help
orsini
|
|
|
|
|
use string.replace function to replace all line breaks with <br> tags
|
|
|
|
|
thanks you so much
could you give me an example. i mean not the whole code, but how will be the line.
|
|
|
|
|
if s = your string returned fromt he database, you'd use
s.replace(vbCrLf, "<br />")
in VB - you'll have to look up the C++ or C# versions yourself if you need them... but the VB constant vbCrLf is just the carriage-return line-feed characters which are Chr(13) and Chr(10), so you can maybe work this out yourself... ie, the VB equivalkent is
s.replace(Chr(13) & Chr(10), "<br />")
(it's probably the same in C except for the ; at the end)
|
|
|
|
|
|
Sorry before i come here i try to make this works , but i can't here is my code, went to the documentation and didnt no find anything, could you help me with that?
<asp:sqldatasource id="SqlDataSource1" runat="server" connectionstring="<%$ ConnectionStrings:vpx_newConnectionString %>"
="" selectcommand="SELECT [pname], [pdescription] FROM [vpx_products]" oldvaluesparameterformatstring="original_{0}">
Dim s As String = SqlDataSource1.SelectCommand("pdescription")
s.replace(Chr(13) & Chr(10), "")
|
|
|
|