|
I am populating a drop down list from AD, which is working fine (The drop downlist is populated when I browse to the site.) The problem I am having is that when I later go to use that data with dropdownlist.SelectedItem.Text, nothing is returned. Any suggestions?
Dim Groups1 As New DirectorySearcher<br />
Dim GroupSearchRoot1 As New DirectoryEntry("LDAP://OU=SomeOU,OU=SomeOU,OU=SomeOU,DC=SomeDomain,DC=SomeTopLevelDomain")<br />
<br />
With Groups1<br />
<br />
.SearchRoot = GroupSearchRoot<br />
.Filter = "(&(ObjectClass=Group)(CN=SomeGroup))"<br />
End With<br />
<br />
Dim Members1 As Object = Groups1.FindOne.GetDirectoryEntry.Invoke("Members", Nothing)<br />
<br />
For Each Member As Object In CType(Members1, IEnumerable)<br />
Dim CurrentMember1 As New DirectoryEntry(Member)<br />
dropdownlist.Items.Add(CurrentMember1.Name.Remove(0, 3))<br />
<br />
Some code to sort the dropdownlist alphabetically...
|
|
|
|
|
This looks messy and complicated. I also don't see any code to stop it running every postback, or any indication where it runs. If you run this code in page load, it resets the data source, and thus will cause the selection to be lost.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
The site is simply a one page form with a submit button, basically a web form for employees to use for new user requests. On submit a specifically crafted email is sent to our ticketing system creating a ticket for the various IT groups involved in New User setups. The ticketing system sends an email to an "Authorized Manager" asking for approval for the request. The drop down list is a list of Authorized Managers.
Currently the site is in prod, with a hard coded list of Authorized Managers, I am trying to improve it by using AD Security groups so that I don't have to manually maintain the list.
Should I ditch the above code and try something else, or is there some way that I can salvage it? I am just a script monkey Sys Admin trying his hand at "actual" prgramming to improve process.
|
|
|
|
|
Sorry for the vague question but I have a DLL that is my UI package from another project, now before I start a new project I wish to know, is porting over vb.net custom controls to asp.net controls relatively easy and straightforward as I'm making it out to be, or is there some complexity that wouldn't be apparent to me.
|
|
|
|
|
EliottA wrote: is porting over vb.net custom controls to asp.net controls relatively easy and straightforward
I don't know what you mean by that. The question does not make any sense.
VB.NET is a language, that happens to use the .NET Framework, of which ASP.NET is a part.
Are you confusing the language with WinForms? (Another part of the .NET Framework concerned with windows forms applications)
|
|
|
|
|
Sorry again for the confusion, yes my UI library was made for Win Forms, and I wish to use the same control set in an asp.net project without rewriting all the controls, can this library be shared across win forms and asp.net projects or would that be an improper design?
|
|
|
|
|
You want to use some of your vb.Net winform controls to your asp.net project ?
|
|
|
|
|
Well yes.. just to keep the same look without rewriting every control used..
I take it I'm walking down the wrong path here?
|
|
|
|
|
Yes.
Think about it a little. They are two separate environments that require separate types of rendering, and thus coding. An ASP.NET control can be written as a collection of html tags which wouldn't render on a WinForm. Likewise, a WinForm control could be written to make use advanced GDI+ methods that would not be able to be rendered in the browser.
only two letters away from being an asset
|
|
|
|
|
There is a requirement in my page to store the bytearray temporarily in some way and later use the same for insertion.
There is a fileupload functionality in my page and the bytearray stores the filesize. Since I need to insert the filesize into database only after some conditions met, I need to store this temporarily. Can anybody please help me regarding this?
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
yes you can but you should consider using the Session instead.
|
|
|
|
|
meeram395 wrote: bytearray temporarily in some way and later use the same for insertion.
meeram395 wrote: Since I need to insert the filesize into database only after some conditions met, I need to store this temporarily
So, all that time you are in the same page ? and what would be the file Size ?
It this scenarios, I will suggest to use seesion.
|
|
|
|
|
Hi
I got one task in my project..i am new to C# technolgies..Please suggest me some way,..
I have some fields
ssn,Firstname,lastname,Dayofbirth,Dayofmonth,Dayofyear,sex,Fathers surname,father intials
and i have some search conditions to search the data..like
1.Fname,Lanme ,Doy
2.Lname,Fatherssurname,DOB,DOM,DOY
3.ssn..etc
when the user enter the values and clicks submit button the vluea are matching with any of my search condition i have to generate xml file and send to the task table in database..
How can i do that ???
first i want to create xml file..how to do tht ?
after creating xml file..i have to write looping statement right??my condittion statement like how??
if(!ssn=null)
{
??
}
|
|
|
|
|
You might want to check out the XML DOM tutorials at www.w3schools.com
|
|
|
|
|
To create an XML file you can use LINQ.
It's like your Database Query....You can learn it easily also it is very useful.
Otherwise you have to take care of child elements and sub elements and so on...with a hell lot of conditions in LOOPS.
It's not enough to be the best, when you have capability to be great....
|
|
|
|
|
I am working on online estate management and i want the code for online transaction throuth which the transactions performs
|
|
|
|
|
AshishRasekar wrote: and i want the code
I think you are looking for this[^]
|
|
|
|
|
AshishRasekar wrote: I am working on online estate management and i want the code for online transaction throuth which the transactions performs
So, you are expection some one else will do the job for you ? No it will not happen here. No body will going to help you if you asking this type of questions, Please come with some specific problem.
|
|
|
|
|
So, you'd take random code off the web, and entrust it with your client's secure transations ? See, this is the sort of thing I show people who ask me why outsourcing is bad.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
The person who asked this question might be wrong.
And he also didn't mention that his requirment is related to outsourced project.
Why do you hurt the people working on outsourced project?
|
|
|
|
|
dotnet buddy wrote: And he also didn't mention that his requirment is related to outsourced project.
Well, welcome to the land of the bleeding obvious. Sorry.
dotnet buddy wrote: Why do you hurt the people working on outsourced project?
I don't want to hurt anyone. People who are taking work they can't do, and charging $3 an hour for it, are hurting me, and the credibility of my industry. Then they come here and ask me to do their work for them.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Hi,
I have an iframe inside the updatepanel in my asp.net 2005 application.I want to refresh the update panel without refresh the iframe.whether it is possible ?
Please answer this question as soon as possible.because iam in very critical situation.
Thank You,
Regards,
PandiaRajan.S
|
|
|
|
|
atgpandiarajan wrote: Please answer this question as soon as possible.because iam in very critical situation.
That is very rude. People here answer questions on their own time, not yours. Just because you've gotten yourself into a bind, most likely by promising something you can't deliver, doesn't mean that we should all jump to your request.
only two letters away from being an asset
|
|
|
|
|
hehe
Failure to plan on your part does not constitute an emergency on my part
|
|
|
|
|
atgpandiarajan wrote: I have an iframe inside the updatepanel in my asp.net 2005 application.I want to refresh the update panel without refresh the iframe.whether it is possible ?
atgpandiarajan wrote: Please answer this question as soon as possible.because iam in very critical situation
|
|
|
|