|
Hi guys.
I'm still unable to avoid the popup when trying to gain access. I've got security groups setup for myself on the directory and files required.
Also my AD server, users and PC are on the same AD domain.
I'm really unable to determine what it is that needs to be done in order to get this issue sorted out.
|
|
|
|
|
Hi,
Can anybody tell me , why IIS 5.1 gives The operation has timed out for a simple Web request to the Web service deployed in it ?
Can i know about different scenario's in which this exception occurs except the File upload and download cases.
My web service start working after performing iisreset untill it wouldn't worked at all.
Regards
Datta.
|
|
|
|
|
Try to restart IIS ..! It is due to the connection leak some times !
If It Helps Click It as Answer
|
|
|
|
|
The Case is whenever you request IIS, it spawns a new thread from the Threadpool, generates the output and returns it back. Somehow in the middle I think it cant generate the response properly. This happens when there is memory leaks or ThreadPool is full. Try to handle your memory properly in your code and also If possible create a separate Application pool for this site.
Restarting IIS will clear the Application Pool area and thus the site comes alive again.
|
|
|
|
|
Hi guys,
Can anyone tell me where i can download sample codes showing how to host remotable server objects in an ASP.net 2.0 application.
Thanks in advance.
|
|
|
|
|
This [^]may give you a head start.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I have a treeview in my master page which is populated from database and its items (nodes) depends on the logged in user.
How can I minimize the database hits that may happen on page navigation. I believe caching is the solution for that. Will fragment caching help in minimizing the treeview binding since it is different from user to user?
Is there a way to persist the value of the control between page redirections?
|
|
|
|
|
|
Hi there!
I am having difficulty in deleting a row from a gridview. I would like to delete a row of data in a gridview using checkbox but at the same time would not delete that data from the database. I have tried using deleteRow method but am still struggling. Is there a work-around solution for this?
BtnDelete Method
Protected Sub btnDelete_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDelete.Click
If Not IsPostBack Then
Dim Row2 As GridViewRow
Dim rowCell As String = ""
Dim count As Integer = 0
Dim test As Integer = 0
Try
For Each row As GridViewRow In GridView1.Rows
Dim checkBxText As String = CType(row.FindControl("chkDelete"), CheckBox).Text
Row2 = GridView1.Rows(count)
rowCell = Row2.Cells(2).Text
Dim cb As CheckBox = DirectCast(row.FindControl("chkDelete"), CheckBox)
If cb.Checked Then
Try
'GridView1.Row(row.RowIndex).Delete()
MsgBox(row.RowIndex)
GridView1.DeleteRow(row.RowIndex)
Catch ex As Exception
'MsgBox(count)
GridView1.DataBind()
End Try
Else
End If
count += 1
'DataBind()
Next
Catch ex As Exception
MsgBox(ex.Message)
End Try
End If
'BindData(idSelection)
End Sub
Private Sub ToggleCheckState(ByVal checkState As Boolean)
For Each row As GridViewRow In GridView1.Rows
Dim cb As CheckBox = row.FindControl("chkDelete")
If cb IsNot Nothing Then
cb.Checked = checkState
End If
Next
End Sub
|
|
|
|
|
Have you tried deleting the row from the datatable you bounded the grid and don't save the datatable to the database back. just after delting the data from thedatatable rebind the grid.
|
|
|
|
|
I think you can simply use datatable for your table manipulation in disconnected environment.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
Thanks
Md. Marufuzzaman
|
|
|
|
|
Hi,
I have a generic list with the following collection
Name
Age
ID
Count
Mark
How can i remove the items with age=10
Thankyou
YPKI
|
|
|
|
|
|
How about
list.RemoveAll(f => f.Age == 10);
|
|
|
|
|
string connection2 = ConfigurationManager.AppSettings["conn"];
OleDbConnection con2 = new OleDbConnection(connection2);
string connectionString = ConfigurationManager.AppSettings["conn"];
if(DropDownList1.SelectedItem.ToString()=="ALL")
{
string query = "select * from appointment where DATE > @StartDate and DATE < @EndDate ";
}
else
{
string query = "select * from appointment where DATE > @StartDate and DATE < @EndDate and DOCTOR_NAME='"+DropDownList1.SelectedItem.ToString()+"'";
}
// wrap the connection and command in using block to avoid resource leaks.
using (OleDbConnection connection = new OleDbConnection(connectionString))
using (OleDbCommand command = new OleDbCommand(query, connection))
{
command.Parameters.AddWithValue("@StartDate", sel.ToShortDateString());
command.Parameters.AddWithValue("@EndDate", tmp.ToShortDateString());
connection.Open();
// using a reader. You don't need a dataset as you are not persisting it in memory
using (OleDbDataReader reader = command.ExecuteReader())
{
GridView1.DataSource = reader;
GridView1.DataBind();
}
connection.Close();
}
}
its showing an error like
Error 1 The name 'query' does not exist in the current context C:\Users\Ankit\Documents\Visual Studio 2005\WebSites\WebSite1\Default.aspx.cs 53 56 C:\...\WebSite1\
can anyone help
|
|
|
|
|
|
using (OleDbCommand command = new OleDbCommand(query, connection))
in dis line
|
|
|
|
|
Try This:
<big>string query ;</big>
if(DropDownList1.SelectedItem.ToString()=="ALL")
{
string query = "select * from appointment where DATE > @StartDate and DATE < @EndDate ";
}
else
{
string query = "select * from appointment where DATE > @StartDate and DATE < @EndDate and DOCTOR_NAME='"+DropDownList1.SelectedItem.ToString()+"'";
}
|
|
|
|
|
|
I think it's because you are declaring the string variable, query, inside the If statement, therefore it is out of scope. Declare the variable at the top with the other declarations.
|
|
|
|
|
So how come you're smarty enough to use params for StartDate and EndDate but not for the doctor name?
|
|
|
|
|
Hi,
I have a gridview with autogenerated fields, 2 template fields, 1 command field. Now, I want to hide one of the columns in a gridview .
I have a code written in rowdatabound
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
e.Row.Cells[2].Visible = false;
}
this code works well when I have not introduced allow paging=true.
but when I have a page indexing property my code for pageindexingchanging is:
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
gridview1.pageindex=e.newpageindex;
fillgrid();
}
where fillgrid is a function which is simply binding data coming from data base in gridview.
when I add page indexing to my gridview I get an error:
Specified argument was out of the range of valid values.
Parameter name: index
on this line:
e.Row.Cells[2].Visible = false;
any help shall be appreciated.
|
|
|
|
|
Instead of
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
e.Row.Cells[2].Visible = false;
}
try
protected void GridView1_DataBound(object sender, EventArgs e)
{
e.Row.Cells[2].Visible = false;
}
|
|
|
|
|
Hi Meetu,
Meetu Choudhary wrote: protected void GridView1_DataBound(object sender, EventArgs e)
{
e.Row.Cells[2].Visible = false;
}
I tried but there is an error that it cannot access 'row' in the gridview1_databound event
|
|
|
|
|
Oh Sorry I posted Wrong Code.
Try This
protected void GridView1_DataBound(object sender, EventArgs e)<br />
{<br />
GridView1.Columns[0].Visible = false;<br />
}
|
|
|
|