|
using System.DirectoryServices;
and use DirectoryEntry and DirectorySearcher Class.
if you have any doubts you can ask me !!!
|
|
|
|
|
Can you give a full example?
Socheat
|
|
|
|
|
create connection
public static DirectoryEntry GetDirectoryEntry()<br />
{<br />
DirectoryEntry de = new DirectoryEntry();<br />
de.Path = LDAP:
de.Username = @"yourdomain\sampleuser";<br />
de.Password = "samplepassword";<br />
return de;<br />
}
Click Here For details
Active Directory .NET[^]
|
|
|
|
|
|
I have a web control (btnClose) for close the application. And I have wrtn. the flg. js. in my page load.
btnClose.Attributes.Add("onClick", "window.close();")
If I click close btn., I'm getting msg. such as "Do u want to close the window Y or N?" without post back. If I click yes, it is geting closed. But If I click no, at that time only, my page is getting post back. How to avoid this post back, even when I click 'No'.
Balasubramanian K.
|
|
|
|
|
Try this:
btnClose.Attributes.Add("onClick", "return window.close();")
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
No. Post back is happening if I click 'No'. Is there any other idea?
Balasubramanian K.
|
|
|
|
|
I modified html button istead of web control button. Now It is working well without any post back. Tnx for your effort.
Balasubramanian K.
|
|
|
|
|
use return false after .close();
|
|
|
|
|
Heelo experts
i have to display reservations of vehicle in html table as displayed visullay like schedule General control or like outlook .
i have to use html table for display reservations .
i have to set start_of_displaytime and end_of_diplay_time of reservations .
any help or article is highyly appercaited please iam stuck on this from month or so.
Rameez
|
|
|
|
|
Hi,
First of all, im not really sure whether you are getting data in the forum of a dataset. And I would like to know, why you want to stick to the html table.
For the HTML Table : What is suggest is, you could construct the table and add the table an ASP.NET Panel control.
Another way of doing :Or else if you go for some thing like a GridView or DataList control, we could directly bind the values. Let me know whot exactly you want, I will guide you with this.
Thx,
Gayani
|
|
|
|
|
Thank you very much Gayani Devapriya ,
iam very thank ful for you for help.
Actualy i have to display reservations visullay like
"http://www.codeproject.com/KB/custom-controls/schedule.aspx"
in above link there is General schedular control i want to design some thing like this .
can u send me your email ID as i can send u code script for testing becuase iam new in this filed and iam stuck on this from last month .
your help is highly appericated .
regards
Rameez
|
|
|
|
|
Hi,
My email is gayani.devapriya@gmail.com, but Im sorry to say that I cannot access private mails account from my office. So Ill just stick to the Code Project Forum for the time being.
I justed looked at the sample link given. First of all I need to know for whot sort of a object you get the data from the database. ie; innitialy are you getting it to a Dataset or a Collection?
I will show a simple example using a Dataset.
DataSet dsSchedule = GetMySchedule();
This wil have a structure like
Channel, Time, Program
C1 T1 P1
C2 T2 P2
C1 T3 P3
Now you want it to look like
Channel T1 T2 T3
C1 P1 NA P3
C2 NA P2 NA
1. Create a Panel where you want this table to be.
2. Now we will create a table dynamically.
Table tblDetails = new Table();
2.1. Create Table headers.
TableRow trHeader = new TableRow();
2.1 Now lets add cell by cell.
Create the first cell to represnt the Channel.
TableHeaderCell thcChannel = new TableHeaderCell();
thcChannel.Text = "Channel";
trHeader.Cells.Add(thcChannel);
Now for the other header cells, write a method to get all the Times(T).
Lets say you get all the times(T1,T2) to a List. List<string> times = new List<string>();
times = //Write a method to retrive all times.
traverse the list now using for each and assign each time(T) to the cell's Text property, and add the cell to the row, as explained above.
And add the header to the table
tblDetails.Rows.Add(trHeader);
By now your table header will be complete.
2.2. Lets create rows now.
First cell of the row should have the channel name(ex : C1, C1), while others with the program names(ex : P1, P2)
The initial dataset dsSchedule will have all these data.
foreach(DataRow dr in dsSchedule.Table[0].Rows)
{
TableRow trData = new TableRow();
TableCell tcChannel = new TableCell();
tcChannel.Text = dr["Channel"].ToString();
trData .Cells.Add(tcChannel);
Now for each channel and time we need to get the value, so you may filter your dataset as follows.
foreach(string sTime in times)
{
string sCurrentChannel = dr["Channel"].ToString();
string sCurrentTime = sTime;
DataView dv = ds.Tables[0].DefaultView;
dv.RowFilter = "Channel == '" + sCurrentChannel + "' & Time == '" + sCurrentTime + "'";
DataTable dt = dv.ToTable();
string sProgram = string.Empty;
if (dt == null)
{
sProgram = "NA";
}
else
{
sProgram = dt.Rows[2].ToString();
}
TableCell tcProgram = new TableCell();
tcProgram .Text = sProgram;
trData.Cells.Add(tcProgram );
}
tblDetails.Rows.Add(trData);
}
Now all your data should be there.
3. Add the table to the Panel
pnlSchedule.Controls.Add(tblDetails);
Hope its clear..
Thx,
Gayani
|
|
|
|
|
Thanks Gayani Devapriya
i will try on this stuff thanks for giving email ID but i will not distrub you (sure) again thanks for help.
one thing i have to continue working on schedular control (link that i had sent u) or i have to design control myself through folowing your steps .
I know u would be bussy else to provide guaidance is big thing for me .
i have to use Gridview or table control for display? which one is easy?
thanks
rameez
|
|
|
|
|
Hi,
No probs at all...glad to help you out...
What I feel is even if you use a GridView, you many have to bind data to it, I doubt whether your data is in such a format for a direct bind...so what I suggest you to do is..create a small sample, and try to construct a table of a schedule structure dynamically - you can use the same code I've given above...(with two lines of data).
For the performance point of view, its better if we could cut off the round trips to DB. ( Just a suggestion ) But for the time being, lets see how we could implement this...
Hope its clear..
Thx,
Gayani
|
|
|
|
|
Thanks Gayani Devapriya
iam confuse with that how i made a method of adding time slot dynamically with table header cell based upon start_display_datetime and end_display_datetime like
8:00AM to 8:00PM with interval of 15 minutes .
give me hint that how i do that .
regards
Rameez
|
|
|
|
|
I took the 528 test and beleive i got this question wrong, since i chosed A,D
Shouldnt i set enablePasswordRetrieval = true to let the user retrieve the password?
================================
You create a Web Form. The Web Form allows users to recover their passwords. You add a
PasswordRecovery server control by using the following code
segment.<asp:PasswordRecovery runat="server"/>You need to ensure that the server
control generates a new password and sends it by e-mail to the users e-mail address.
Which two actions should you perform? (Each correct answer presents part of the solution.
Choose two.)
A. Create a valid <smtp> definition in the Web.config file.
B. Set the passwordFormat attribute of the configured membership provider to Encrypted.
C. Ensure that the enablePasswordRetrieval attribute of the configured membership provider is
set to False.
D. Ensure that the enablePasswordRetrieval attribute of the configured membership provider is
set to True.
Answer: A, C
Alexei Rodriguez
|
|
|
|
|
I get an error while running ASP.NET 2.0 applications:
"Unable to debug Web Application.Unable to connect to WebServer.... "
When we try to run using Release Mode , we will get an error: "Unable to access IIS Meta base....."
Steps to over come this situation:
1) GIve permissions to the folder located in
>..Windows\Microsoft.NET\V2...
to the version folder, right click and select Sharing tab.
Add everone to the userlist and give fullcontrol to it.
2) Now restart the regiis:
> aspnet_regiis -i (From Microsoft 2005 commandprompt)
Now try to run the web application.
|
|
|
|
|
Hi ,
When I am trying to drag an AJAX Script manager onto my aspx page ,
I am getting an error popup "Access is denied"
Please let me know why it occurs
Thank You ,
Happy Programming!
Regards,
ctrlnick !
|
|
|
|
|
|
Check settings on the asp_client folder in iis. Make sure you can execute scripts.
I didn't get any requirements for the signature
|
|
|
|
|
I have an html image as a button when ever I click the image it should pop me up with a Filebrowser but it always takes two clicks for the first time when I load the page. After the first time it needs only one click. Is it something with the browser or how can I get rid of this double clicking the image.
Here is my Html image:
<img id="uploadImg1" class="imgUpload1" src="~/images/upload1.gif" runat="server"
alt="Select file from your computer" onclick="BrowseSingle()" />
and on the code behind I put this line , eventhough I face the similar problem.
uploadImg1.Attributes.Add("onclick", "BrowseSingle()");
|
|
|
|
|
gottimukkala wrote: uploadImg1.Attributes.Add("onclick", "BrowseSingle()");
where did you add this line ?
|
|
|
|
|
I added this line in the code behind
|
|
|
|
|