|
Use a Dictionary<Key,Value>.
Example:
Dictionary<string, string> test = new Dictionary<string, string>();<br />
test.Add("answer", "42");<br />
string answer = test["answer"];
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
hello friends
i am writing this code but i am not getting user from (Domain Users) group in Active directory. Please help me.
CODE:-
Try
Dim groupName As String = "Users"
If Not (_DirectoryRoot Is Nothing) Then
Exit Sub
End If
authenticationType = New System.DirectoryServices.AuthenticationTypes
authenticationType = AuthenticationTypes.Secure
_DirectoryRoot = New DirectoryEntry("LDAP://dev.eventure.biz", "dev\adadmin", "password_1234", authenticationType)
Dim directorySearcher As DirectorySearcher = New DirectorySearcher(_DirectoryRoot)
directorySearcher.SearchScope = SearchScope.Subtree
directorySearcher.Filter = "(&(objectCategory=Group)(CN=" & groupName & "*))" 'String.Format("(cn={0})", groupName) ' "(cn=" & searchQuery & "*))"
directorySearcher.PropertiesToLoad.Add("member") '"((CN=" & groupName & "*))"
Dim searchResults As SearchResult = directorySearcher.FindOne
If Not (searchResults) Is Nothing Then
Dim Length As Integer = searchResults.GetDirectoryEntry.Properties("member").Count - 1
For i As Integer = 0 To Length
Dim UserName As Object = Split(Split(searchResults.GetDirectoryEntry.Properties("member").Item(i), ",")(0), "=")(1)
' sipUriCollection.Add(GetUserSipUri(UserName))
Next
End If
Catch ex As Exception
End Try
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
Hi,
Help me on this issue,
How to create our own appointment template in aspxschedular.
Thanks,
Sri
|
|
|
|
|
Hi
I want to display Information whenever mouseover event occurs on ImageButton.
Images are displaying using datalist control.
How can I find event OnMouseover in Code behind. Because datalist is displaying on button click event.
Thanks
|
|
|
|
|
You can write javascript to show what you want onmouseover event of the image. This javascript code you can attach to the images inside datalist or any other control.
Apurva Kaushal
|
|
|
|
|
Thanks For the reply.
But where Should I write the code for java script in the datalist.
Because on mouse over only that perticular id's information will be pop up.
I am getting same id of imagebutton that I bound to datalist.
Thanks
modified on Tuesday, July 15, 2008 2:48 AM
|
|
|
|
|
call the javascript from the datalist.
Put your javascript at the top of your page and then just call the function when you need it
|
|
|
|
|
But From which event of Datalist Should I call the Javascript?
Because When I Click Search Button Result is display.
Result contains Image and some information.
The images displying by using datalist. datalist contains imagebutton.
Though I write code for javascript.When Should I Call. Because if there are 3 records then on mouse over of that records associated infomation I want to display
Thanks
|
|
|
|
|
Have you resolved the issue or still struggling?
Apurva Kaushal
|
|
|
|
|
when u bound image in datalist then
i think u use for bound the image.
so u should use this code...
give title=Single cote(because single code is not dispalying in this box.)
may be this code will help u......
modified on Tuesday, July 15, 2008 3:49 AM
|
|
|
|
|
Thanks For reply.
I am using ImageButton.
|
|
|
|
|
<asp:ImageButton ID="img" ImageUrl='<%# DataBinder.Eval(Container.DataItem,"Image") %>' title='<%# DataBinder.Eval(Container.DataItem,"Name") %>' runat="server" />
u cange only column name ....]
then it will run......
|
|
|
|
|
Hi friends
I need a help to get a current time of UK from US current time.
Can anybody guide me to solve the above issue
Advance thanks for your help
Thank U
G Nathan
modified on Tuesday, July 15, 2008 2:14 AM
|
|
|
|
|
try this:
http://www.quantumsoftware.com.au/ProductsServices/WorldTimeWebService.aspx
http://www.csharphelp.com/archives2/archive356.html
|
|
|
|
|
hai all,
i am using .net 2005.i am doing my project in asp.net using c#.for my project back end is MS ACCESS 97.
the following code is
com = new OleDbCommand("select HolderNo,HolderName,DepartmentNo,mid(Appsetdata," + bb + ",2),JobTitle from holderdata where DepartmentNo <> '0000'", con);
dr = com.ExecuteReader();
i1 = 0;
while (dr.Read())
{
holno[i1] = dr.GetString(0);
holname[i1] = dr.GetString(1);
dept[i1] = dr.GetString(2);
appset_holder[i1] = Convert.ToInt16(dr.GetString(3));
jobtitle[i1] = dr.GetString(4);
i1++;
}
dr.Close();
in the above code shown the error in jobtitle[i1] = dr.GetString(4);
the following error were display,
System.InvalidCastException: Specified cast is not valid. at System.Data.OleDb.ColumnBinding.ValueString() at System.Data.OleDb.OleDbDataReader.GetString(Int32 ordinal) at _Default.emp_iterate() in c:\Documents and Settings\sabari\My Documents\Visual Studio 2005\Projects\styrisact1\Default.aspx.cs:line 182 at _Default.validate_main() in c:\Documents and Settings\sabari\My Documents\Visual Studio 2005\Projects\styrisact1\Default.aspx.cs:line 126 at _Default.SubmitImageButton_Click(Object sender, ImageClickEventArgs e) in c:\Documents and Settings\sabari\My Documents\Visual Studio 2005\Projects\styrisact1\Default.aspx.cs:line 101
how to solve the above error?thanks to all in advance.
|
|
|
|
|
According to the error text, I think there may be a problem with
appset_holder[i1] = Convert.ToInt16(dr.GetString(3)) this line of code. Maybe the value returning from database is null or empty and you are trying to convert it to Int16. Check the value in DB.
Hope this helps.
|
|
|
|
|
hai all,
i am using .net 2005.i am doing my project in asp.net using c#.for my project back end is MS ACCESS 97.when i pass the vale means the following error were display,
System.InvalidCastException: Specified cast is not valid. at System.Data.OleDb.ColumnBinding.ValueString() at System.Data.OleDb.OleDbDataReader.GetString(Int32 ordinal) at _Default.emp_iterate() in c:\Documents and Settings\sabari\My Documents\Visual Studio 2005\Projects\styrisact1\Default.aspx.cs:line 182 at _Default.validate_main() in c:\Documents and Settings\sabari\My Documents\Visual Studio 2005\Projects\styrisact1\Default.aspx.cs:line 126 at _Default.SubmitImageButton_Click(Object sender, ImageClickEventArgs e) in c:\Documents and Settings\sabari\My Documents\Visual Studio 2005\Projects\styrisact1\Default.aspx.cs:line 101
how to solve the above error?thanks to all in advance.
|
|
|
|
|
|
Hello! Everyone:
There is a problem to deal with :
There is a Button(only for eample) named 'butNew' in the page
I get it in the form of 'control' not 'Button', by its name .
I want to convert this 'control' to its subClass 'Button' in runtime
but I don't want to use such method as '(Button)control '
because I wander a common method , thinking that there may be many
kinds of Controls in a page,besides 'Button'.
Can you help me ??
Thank you!
|
|
|
|
|
Hi all,
I have to display all types of images including flash imges to user.
I could able to display images of all formats except .swf(flash) files
in Image Control of asp.net.
For Displaying .swf(flash)images i used FlashConrol(from FlashControl.dll).
This control is only displayinf images of type .swf, but i want to display all types of images under single control(asp.net control / third party control).
Is it possible ?
If yes!, How?
Please help me.
Thanks in advance.
|
|
|
|
|
hi all,
i use an ajax radgrid and i want to convert it to Excel Sheet, this error appear when i do that,
unexpected ajax response was recived from the server.
this may be caused by one of the follwoing reasons:
- server. transfer
-custom http handler
-incorrect loading of an "Ajaxified" user control.
how can Solve this error??/
thanks all
|
|
|
|
|
Hi,
I am using a Web service beween a Window application running on client and server mechines.The web service uploades the files and images on the server mechine. But i am having problem to find the application path on the server mechine. I used the following code but this returns the path of the web service rather than window application.
System.Reflection.Module[] modules = System.Reflection.Assembly.GetExecutingAssembly().GetModules();
strApplicationPath = System.IO.Path.GetDirectoryName(modules[0].FullyQualifiedName);
I need to find the path of window application through web service.
can anybody help me?
|
|
|
|
|
Hi,
For the time being i have found a solution. i am putting the window application path in the web.config of the webservice. As the application will be installed on the server mechine or the path changes, the web.config of the webservice will be updated. How is the solution.? Is it right appraoch?
Thanks in advance.
|
|
|
|
|
|
Thats awesome... You told us...
|
|
|
|