|
Dim dd As Date
dd = Date.Now
Label1.Text = dd.Date.AddDays(1)
|
|
|
|
|
when i m accessing a webservice using a web app built in asp.net 1.1. It is working fine.
Web app and web service has integrated windows authentication. it is working fine.
but when i access this same web service from my asp.net 2.0 app. it is giving error of 401 unauthorized access.
what can be the problem?
|
|
|
|
|
hey guys,
I have another question.
the situation: we get a dynamic DataSet back from a server system. (DataSet ds = bla.getDS();)
the question: is there any way we can use the dynamic DS to generate a report.
From what I've seen it's not that easy to do. most use a DataSet object (xsd) so..
any help if possible?
|
|
|
|
|
Hai..
I use asp.net, i have 2 pages for the webpage, one is parent page and one is child page.When i click the link from the parent page, i need a pop up window for my child page to display the additional information. How i coding ( have sample code for me is better understanding) when i click the link from the parent page, the child page will automatically refresh and display the new information?
|
|
|
|
|
In code behind you can NOT open a popup window (reason: the code is run on the server so the popup window should open on the server, not on the client. So that's not what you want right)
Workaround: You can open a new window by using javascript's window.open('newPage.aspx'); You can control by javascript this window so can close it and re-open it again so the page is refreshed you could say...
Hope this helps you
|
|
|
|
|
The allowPaging property of the GridView is set to true
The Grid is being populated using a dataset and the pages 1,2,... can be seen at the bottom of the gridView.
But when the page 2 is clicked the error is:
"The GridView 'grid' fired event PageIndexChanging which wasn't handled."
What is the solution to this please?
Thanks
|
|
|
|
|
You have to create an event handler in you code behind to handle gridview_pageIndexChanging.
|
|
|
|
|
Hi,
Yes.
The following two lines are inside the grid_PageIndexChanging event of a gridview.
When clicking on say page 2 of the grid, the above event gets fired.
But the grid dissapears.
Can you think of why this is happening please?
Thanks
|
|
|
|
|
OK, can't see those lines, but i guess you're maybe not calling to databind on the grid after changing the index...? Or maybe not persisting the datasource across postbacks...?
|
|
|
|
|
These are the two lines
grid.PageIndex = e.NewPageIndex
grid.DataBind()
Thanks
|
|
|
|
|
I think you will need to set the datasource again as it will not be persisted across postback.
|
|
|
|
|
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) {
}
}
|
|
|
|