|
try adding the below code to the IF statement if the panel visbility true...It may work. Not sure...jus check...
if (typeof(Page_ClientValidate) == 'function') <br />
Page_ClientValidate();
Regards - J O N -
|
|
|
|
|
Hi Jon
Thanks.
I just had a look at the CollapsiblePanel in AjaxToolkit.
It works fine for me.
Still thanks for you suggestion.
Cheers
Menon
|
|
|
|
|
you are most welcome
Regards - J O N -
|
|
|
|
|
I'm using form authorization in Web.Config.Both LogIn.aspx and LogOut.aspx work fine but the problem is when user log out ,click back button,it still show previous secure page.
another one is user still can enterthe page by type url directly to browser(after logged out).Is it about cache? How can i clear cache after user logged out?
=)
Thank
|
|
|
|
|
bug_aonz wrote: .Is it about cache
Yes. You are seeing the cached page when pressing back button. This will be cached in the browser and can't be removed from program. You need to check session existence on each page load and ensure it is there.
|
|
|
|
|
You can disable the client-side caching using the below statement...
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Regards - J O N -
|
|
|
|
|
Try using Javascript:
window.history.forward(1);
OR Read this article:
http://www.4guysfromrolla.com/webtech/111500-1.2.shtml
|
|
|
|
|
Hi....
you write these lines in every page in pageload event....so that all the pages will be displaying as page expired so at that time user need to login again to get that page.
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);<br />
Response.Expires = -1500;<br />
Response.Cache.SetNoStore();<br />
Response.CacheControl = "no-cache";
Regards,
Sandeep Kumar.V
|
|
|
|
|
|
Hi,
Currently, i am using Visual Studio 2003. If i install ASP.NET 2.0 (not Visual studio 2005), can i continue to work in Visual Studio 2003?
Thank you
|
|
|
|
|
SUDHAKAR PALLAM wrote: can i continue to work in Visual Studio 2003?
yes you can continue with 2003
Regards,
Sandeep Kumar.V
|
|
|
|
|
Hi,
I need to create a treeview out of the folder and files from a specific FTP location. Any pointers on this would be of great help.
Thanks,
Wesley
|
|
|
|
|
Hi,
I have a gridview, I use a dropdownlist as edititemtemplate.
I don't wanna use SQLDataSource as the datasource for the dropdownlist. I use coding in code-behind page.
I get a problem, when button edit clicked, how to properly bind the data for the dropdownlist at the right time, just for the row clicked?
I've used gridview.rowdatabound event, but i have a problem because the checking proccess when i click the edit button gives error because it goes to gridview1.databind in gridview1.rowediting event before it enters the right row (the row that should be in edit mode).
Please help me check what's wrong, what the solution is... Thank you very much before and after.
Here is my code for rowdatabound and rowediting :
<br />
Protected Sub gridExpenses_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gridExpenses.RowDataBound<br />
Dim conn As New SqlConnection<br />
Dim cmd As New SqlCommand<br />
Dim da As New SqlDataAdapter<br />
Dim ds As New DataSet<br />
Dim dt As New DataTable<br />
Dim conString As String<br />
Dim rdr As SqlDataReader<br />
Dim row As GridViewRow = e.Row<br />
Dim i As Integer = row.RowIndex<br />
<br />
conString = System.Configuration.ConfigurationManager.AppSettings("connString")<br />
conn = New SqlConnection(conString)<br />
<br />
If (row.RowType = DataControlRowType.DataRow) Then<br />
'If (row.RowState = DataControlRowState.Edit) Then<br />
If row.RowState = DataControlRowState.Edit OrElse row.RowState = (DataControlRowState.Edit Or DataControlRowState.Alternate) Then<br />
Dim cmcd As DropDownList = CType(row.FindControl("comboCmcd2"), DropDownList)<br />
conn.Open()<br />
cmd = conn.CreateCommand<br />
cmd.CommandText = "SELECT mcom_idno, mcom_cmnm FROM tbl_mcom"<br />
rdr = cmd.ExecuteReader<br />
cmcd.DataSource = rdr<br />
cmcd.DataBind()<br />
cmcd.SelectedIndex = 0<br />
conn.Close()<br />
End If<br />
End If<br />
End Sub<br />
<br />
Protected Sub gridExpenses_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles gridExpenses.RowEditing<br />
Dim conn As New SqlConnection<br />
Dim cmd As New SqlCommand<br />
Dim cmd2 As New SqlCommand<br />
Dim da As New SqlDataAdapter<br />
Dim ds As New DataSet<br />
Dim dt As New DataTable<br />
Dim conString As String<br />
<br />
conString = System.Configuration.ConfigurationManager.AppSettings("connString")<br />
conn = New SqlConnection(conString)<br />
<br />
gridExpenses.EditIndex = e.NewEditIndex<br />
<br />
conn.Open()<br />
cmd = conn.CreateCommand<br />
cmd.CommandText = "SELECT e.mexp_idno, e.mexp_mnth, e.mexp_year, e.mexp_amnt, e.mexp_cmid, c.mcom_cmnm FROM tbl_mexp e, tbl_mcom c WHERE e.mexp_cmid = c.mcom_idno"<br />
da.SelectCommand = cmd<br />
da.Fill(ds, "mexp")<br />
dt = ds.Tables("mexp")<br />
gridExpenses.DataSource = ds.Tables("mexp").DefaultView<br />
gridExpenses.DataBind()<br />
End Sub<br />
This is my code for the dropdownlist as edititemtemplate :
<br />
<EditItemTemplate><br />
<asp:DropDownList ID="comboCmcd2" runat="server" DataTextField="mcom_cmnm"<br />
DataValueField="mexp_cmid" SelectedValue = '<%# Bind("mexp_cmid") %>'><br />
</asp:DropDownList><br />
</EditItemTemplate><br />
|
|
|
|
|
Hi to all,
I am trying to delete all the files in a specified folder in my project. for that i have written the following function....
==============================================================================
Code
==============================================================================
public void DeleteTempFiles()
{
DirectoryInfo DirInfo = new DirectoryInfo(Server.MapPath("~/temp/"));
if(DirInfo.Exists)
{
foreach (FileInfo FI in DirInfo.GetFiles())
{
FI.Delete();
}
}
}
==============================================================================
But whenever i am running the program it gives the error as....
Error Deleting File or Folder
Cannot delete : It is being used by another person or program.
Close any program that might be using the file and try again.
.....
Anybody help me to solve this problem.
Pravin
|
|
|
|
|
pavya_Cool wrote: But whenever i am running the program it gives the error as....
Error Deleting File or Folder
Cannot delete : It is being used by another person or program.
Close any program that might be using the file and try again.
As Error message is saying might be your application is using some of those files
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
pavya_Cool wrote: oreach (FileInfo FI in DirInfo.GetFiles())
Fileinfo class has opened the file. So try the following
foreach(string strFileName in Directory.GetFiles(YourPath))
{
File.Delete(strFileName);
}
|
|
|
|
|
When Click the internet browser inside button e.g Back, Forword and Close Click only Three Button then display the message.
This problem had been coming for last three days.
Please Help me
-- modified at 5:15 Wednesday 17th October, 2007
|
|
|
|
|
Look - people have replied to you on this subject many times. If you have a specific problem then please do people the courtesy of picking one of the many threads you've created and replying on that one. Don't keep creating posts - it's unfair to everybody else, especially those who may follow the thread in future to see if there is a solution.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Is this a right way to insert bulk data from one DB to an other DB.
Public Function UpdateDs(ByVal QueryStr As String, ByVal ds As DataSet) As Boolean<br />
<br />
Dim DataSet1 As System.Data.DataSet = New System.Data.DataSet<br />
dbConn = New System.Data.SqlClient.SqlConnection<br />
dbConn.ConnectionString = conStr<br />
Dim adp As New System.Data.SqlClient.SqlDataAdapter(QueryStr, dbConn)<br />
adp.Fill(DataSet1)<br />
<br />
<br />
Try<br />
DataSet1 = ds.Copy<br />
adp.Fill(DataSet1)<br />
adp.Update(DataSet1)<br />
Catch ex As Exception<br />
<br />
Return False<br />
End Try<br />
<br />
End Function
Regards.
B asharatA li
Internee
METESYS Lahore
Pakistan
|
|
|
|
|
How could it be? You are only accessing one database in the code.
---
single minded; short sighted; long gone;
|
|
|
|
|
thx for your time
then what is the esiest way to insert it to another database
Regards.
B asharatA li
Internee
METESYS Lahore
Pakistan
|
|
|
|
|
BasharatAli wrote: then what is the esiest way to insert it to another database
Use the facilities of the database, e.g. DTS. Don't try to reinvent the wheel.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
i have a stored procedure , there i have 6 parameters and witing a insert query.i have to do the insetion 4 times .Now my question is i should have 24 parameters in the stored procedure or i should call the stored procedure 4 times?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia - what do you think the answer should be? Just step back and think about it for a while, and then when you've figured it out, do it.
A hint to get you started - is it the same data 4 times, or 4 different sets of data into different tables? That should get you thinking along the right lines.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O`Hanlon wrote: A hint to get you started - is it the same data 4 times, or 4 different sets of data into different tables? That should get you thinking along the right lines.
Good hint. It's calling procedure 4 times. Right ?
|
|
|
|