|
Hi
I am creating a dynamic treeview from sql database while running the page i get the following error
System.ArgumentException: Format of the initialization string does not conform to specification starting at index 52.
I am writing the small code snipet where the error is occuring
private void GenerateTreeView()
{
SqlConnection con=new SqlConnection("server=server-name;database=pubs;user id=sa;password=sa;" + Server.MapPath("~/data/Tree.sql"));
con.Open();
I dont know what causing it this error.
sasi
|
|
|
|
|
Exactly same function works fine in WIN PROJECT but doesn't work in WEB PROJECT
I mean it works in WEB proj. but I don't get any results.
"areh" is our server where ldap users are defined.
Public Function GetUsers()
Dim de As System.DirectoryServices.DirectoryEntry = New DirectoryEntry("WinNT://areh")
For Each dc As DirectoryEntry In de.Children
If dc.SchemaClassName = "Group" Then
' some code
End If
Next
End Function
Please help
Jerry
|
|
|
|
|
any error messages after executing??
|
|
|
|
|
No error. Function works just fine but it seems that doesn't retrieve any resault.
In windows project i get all groups with the same function (it is same function, i use copy paste).
Best regards
|
|
|
|
|
It's probably a permission issue - the asp.net worker account will probably not be a domain account and will have very limited permissions to access the AD.
|
|
|
|
|
what is the authentication mode?
that should be "windows" in web.config
and u do this
go to IIS and right click on the virtual directory
select properties and select directory security
click the edit button under anonymous security and authenticate control.
uncheck the anonymous access and check integrated windows authenication.
May be this will helpful to you
Thanks,
Bhasker P
|
|
|
|
|
My settings:
web.config
<authentication mode="Windows">
Anonymous access (uncheck)
Integrated Windows authentication (checked)
Best regards
|
|
|
|
|
My settings:
web.config
<authentication mode="Windows">
Anonymous access (uncheck)
Integrated Windows authentication (checked)
Best regards
|
|
|
|
|
My settings:
web.config
authentication mode="Windows"
Anonymous access (uncheck)
Integrated Windows authentication (checked)
Best regards
|
|
|
|
|
I also noticed that if i accessing groups on my computer then both web and win function return results.
Thanks
|
|
|
|
|
How am i to insert all my selected items from checkbox list to my database. Right now i only able to insert 1 item to my database even I have select 2 items from my checkboxlist. my code is as below.
mycommand2 = New SqlCommand("INSERT INTO t_userpackage (userID, packageID) VALUES (@userid, @packageid)", myconnection)
mycommand2.Parameters.Add("@userid", SqlDbType.Int, 4).Value = ddluser.SelectedValue
mycommand2.Parameters.Add("@packageid", SqlDbType.Int, 4).Value = chkpackage.SelectedItem.Value
mycommand2.ExecuteNonQuery()
|
|
|
|
|
You only have one item because you only ask one item,
loop through your checkboxes with some kind of loop.
(syntax will not be correct but you'll get the meaning i hope)
foreach(CheckBox chxChecked in chkpackage.SelectedItems){
}
|
|
|
|
|
I trying to loop too but i failed. What is the syntax for looping. BElow is what i done but it is wrong.
Dim i As Integer
For i = 0 To chkpackage.SelectedItem.Count - 1
mycommand2.Parameters.Add("@packageid", SqlDbType.Int, 4).Value = chkpackage.SelectedItem.Value
End If
Next
|
|
|
|
|
I guess the loop is allright, but i'm not familiar with VB.NET, but i can see that there is a logical mistake in your code. You're trying to add each time inside your loop the same parameter. But you need each time you loop a new command which is going to insert the data into your database.
Once that is done, then you can step to the next item.
For your information, maybe you can get some information out of it to transform it to VB.Net i've sketched it in C#:
CheckBoxList chkList = new CheckBoxList();
foreach(CheckBox chkBox in chkList.Items) {
if(chkBox.Checked) {
}
}
|
|
|
|
|
HI all
sorry for re-posting
I want to show records from databse
ON user mouseover
Please can any one tell me Is it posible
THX
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
-- modified at 3:13 Tuesday 9th May, 2006
|
|
|
|
|
You simply put the logic for accessing the database into a mouseover event handler...
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
HI
Sorry for asking But
can u give me the syntax
Thx for reply
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
You mean code, right?
If so, search google, there are plenty of examples on mousemoving, drag&drop and things like that,.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Dear All,
My problem is that I've made an ActiveX component in C#. This component uses .NET Remoting to load an Excel File from the server. To view the excel file I've used AxSpreadSheet. Besides the AxSpreadSheet component the ActiveX control has two buttons as well.
When I try to load it on the webform it gets loaded successfully only if I remove the AxSpreadSheet from the ActiveX component. With it, the webform doesn't load it.
To load it on the WebForm I am using the following code in HTML
<object id="activex123" classid="ActiveXComponent.dll#NamespaceName.ClassName"
viewastext="">
A.U Haq
|
|
|
|
|
HI all
I Have an application which deals with show inforamtion of employe Name & Photo
The names are display in Hyperlink When user Mouseover the Names must display the image in image control How can give the mouse over effect
Please can any one give me an idea on that
Thx
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
On pageload for example you can add an attribute to the hyperlink control where you can define some javascript to show the correct image.
hplHyperlink.Attributes.Add("onmouseover", "javascript that sets the image");
hplHyperlink.Attributes.Add("onmouseout", "javascript that removes the image");
|
|
|
|
|
Hi
thx for reply
I am trying to retrive information from database onmouseover
The image is also in database how can i give this in javascript
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
When you put the persons name in the hyperlink, you already have this information right? Why don't build the javascript on that moment instead of waiting till the user goes on mouse-over?
When you're going to get information from your database on a mous-over event it's going to be a lack of performance.
Off course you can do this, but then you'll have to take the step to AJAX technology, but I personally wouldn't use it for a mouseover.
Greetings,
KrIstOfK
|
|
|
|
|
Hi
i have a paper that content of that is text. i scan it and now i want convert it to the MSword file can i do this work???????? my text is persian language and scaner can not do this work compilitly because their font is not complete. i want a software that can do this work.
can any body help me??????
|
|
|
|
|
hai,
Is it possible to use vb srcipt in asp .net? If yes, how can we use it?If any one have ideas please share it.
Jisha
|
|
|
|