|
Hi all
I have a delete form, in this form i have a drop down that consists of users, all that I need is when the user clicks on the delete button, the selected user will be deleted, it works, but the deleted name is still in the list.
How can I refresh the cache
here is the code...
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Dim conn2 As New OleDbConnection
conn2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\WebSites\NandN\DB\nAndN.mdb;Persist Security Info=False"
conn2.Open()
Dim cm2 As New OleDb.OleDbCommand
cm2.Connection = conn2
cm2.CommandText = "delete from news where n_id=" & DropDownList1.SelectedValue & " "
cm2.ExecuteNonQuery()
Response.Redirect("adminDeleteNews.aspx?flag=1")
Button1.Enabled = False
conn2.Close()
cm2.Dispose()
Catch ex As Exception
Response.Write(Err.Description)
End Try
End Sub
Regards.
Nour Abdel-Salam...
A Trainer and a Web Developer in Jedda Int'l Computer Center(JICC)
|
|
|
|
|
You have to bind the dropDown list again with the data source after u deleted the record from Database .
|
|
|
|
|
it works
thanks alot
Nour Abdel-Salam...
A Trainer and a Web Developer in Jedda Int'l Computer Center(JICC)
|
|
|
|
|
Hi Friends,
I want to retreive the complete datagrid values from another website.Is it possible? Please can you give me the solution?
Thanks & Regards
Senthil Kumar
|
|
|
|
|
No, it's not even remotely possible, for you to think it is, means you really don't understand how things work. Unless you don't mean a datagrid, you just mean a HTML table. In that case, you can do a request to the website and use string mashing or regex to parse out the values. But, there's no way to access a datagrid or any other server side object of another site.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Well its not Possible , you cant do that.
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi all
I have a delete form, in this form i have a drop down that consists of users, all that I need is when the user clicks on the delete button, the selected user will be deleted, it works, but the deleted name is still in the list.
How can I refresh the cache
Regards.
Nour Abdel-Salam...
A Trainer and a Web Developer in Jedda Int'l Computer Center(JICC)
|
|
|
|
|
Where are you getting the data from?
Are you using a sqldatasource??
If you are getting the data directly, you can update or delete the cache item directly and rebind the dropdownlist
If you are using a sqldatasource, try this: http://forums.asp.net/p/895314/964199.aspx[^]
Alexei Rodriguez
|
|
|
|
|
thanks sir
I'm using access database
regards...
Nour Abdel-Salam...
A Trainer and a Web Developer in Jedda Int'l Computer Center(JICC)
|
|
|
|
|
How to create a website in IIS using asp.net?Is there any way to check version of IIS is running on machine?
|
|
|
|
|
Just open VS, create new website, select http in location and type the url of the remote site or localhost for local iis
Alexei Rodriguez
|
|
|
|
|
It seems you know nothing about ASP.NET. IIS hosts ASP.NET, you create the website in ASP.NET and ASP.NET hosts it. There is no reason to check what version is running.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Christian Graus wrote: you create the website in ASP.NET and ASP.NET hosts it
You meant and IIS hosts it
Christian Graus wrote: There is no reason to check what version is running.
It depends on the .Net FrameWork version
e.g. applications that target .Net Framework 3.5 can only be hosted on IIS 7
foreach(Minute m in MyLife)
myExperience++;
|
|
|
|
|
Yes, but if IIS can't host it, then how would the code run to check that ? So, there would be no point in writing that code, you should check at the point of deployment if your version of IIS will run the code, and it will, or it won't.
you're right, I meant to say IIS.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Plz chk the article
http://www.codeproject.com/KB/aspnet/VSDeploy.aspx[^]">
Cheers!!
Brij
|
|
|
|
|
Yes it seems as if you dont know what you are talking about. First we dont Develop our Applications in IIS, IIS host the Site , we dont Develop in IIS. You Should Say you have a ASP.NET App and you want to knwo how to Deploy it. After your Computer is updated with the .Framwork. go to your IIS and right Click and create a Virtual Directory, make sure it points to your Application and walla its working... but there more settings that needs to be adjusted according to your app. Shout if you need help.
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi,
I have create chart in excel for grid data in asp.net 2.0.
my code is
Dim xlWorkBook As Excel.Workbook
Dim xlWorkSheet As Excel.Worksheet
xlWorkBook = New Excel.Application().Workbooks.Add(Missing.Value)
xlWorkBook.Application.Visible = True
xlWorkSheet = xlWorkBook.ActiveSheet
' Gets the dataset containing the data
'ds4 is gridview dataset
Dim dsData As DataSet = ds4
Dim i As Integer = 2
' Outputting the fieldnames in pink bold color
xlWorkSheet.Cells(1, 1) = "Student ID"
xlWorkSheet.Cells(1, 2) = "Student Name"
xlWorkSheet.Cells(1, 3) = "Maths"
xlWorkSheet.Cells(1, 4) = "science"
xlWorkSheet.Cells(1, 5) = "Total"
xlWorkSheet.Range("$A1:$E1").Font.ColorIndex = Excel.Constants.xlColor1
xlWorkSheet.Range("$A1:$E1").Font.Bold = True
' Outputting the data
For Each dr As DataRow In dsData.Tables(0).Rows
xlWorkSheet.Cells(i, 1) = dr(0)
xlWorkSheet.Cells(i, 2) = dr(1)
xlWorkSheet.Cells(i, 3) = dr(2)
xlWorkSheet.Cells(i, 4) = dr(3)
' Building the formula for calculating the sum
xlWorkSheet.Cells(i, 5).Formula = "=SUM($C{0}:$D{0})".Replace("{0}", i.ToString())
' Going to the next row
i = i + 1
Next
' Auto fit the columns
xlWorkSheet.Columns.AutoFit()
' Generating the graph
Dim chart As Excel.Chart
chart = xlWorkBook.Charts.Add()
With chart
.ChartType = Excel.XlChartType.xlColumnClustered
.SetSourceData(xlWorkSheet.Range("A1:E11"), 2)
.HasTitle = True
.ChartTitle.Characters.Text = "Students' marks"
.Axes(1, Excel.XlAxisGroup.xlPrimary).HasTitle = True
.Axes(1, Excel.XlAxisGroup.xlPrimary).AxisTitle.Characters.Text = "Students"
.Axes(2, Excel.XlAxisGroup.xlPrimary).HasTitle = True
.Axes(2, Excel.XlAxisGroup.xlPrimary).AxisTitle.Characters.Text = "Marks"
End With
'Catch ex As Exception
' Throw ex
'End Try
the error is [IndexOutOfRangeException: Cannot find table 0.]
Please help me
|
|
|
|
|
It must be because there is no table at index 0 in your dataset
Make sure you check that there is a table in the dataset
shanthi jothi wrote:
' Gets the dataset containing the data
'ds4 is gridview dataset
Dim dsData As DataSet = ds4
What do you mean by this??
Alexei Rodriguez
|
|
|
|
|
You are flooding these forums with the most trivial questions. You obviously are very new to the world of programming. If you are trying to do such complex things because it's your job, then shame on you and on your company. If you have a choice, then you should try more simple tasks, and you should definately try reading some books. If you have no choice, then you should expect that people will soon get sick of doing your job for you, and stop answering you. We're here to help people who want to learn, not people who are trying to do jobs they are in no way remotely qualified for.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Just Cool down "Graus"
may be her job is at stake ....
There is no dearth of brutal and sadistic Project Managers
poor thing i think she is really desperate
|
|
|
|
|
Dear All
I need a guide line to understand the web.config senerio
All Function and the perfect use of web.config.
Its title bit complex to understand.
Kindly do replay.
Thanks.
|
|
|
|
|
|
Hi Abjit,
I uploaded the asp.net code in my server and i created database in web hosting server.some pages are opening some pages are not opening.can you tell please tell me what might be the reason behind that.please help me.
login page is opening but checking for authentiation its getting web config error like that.please help me.
Thanks in advance
pavani
|
|
|
|
|
Can you please tell the details of the error
Cheers!!
Brij
|
|
|
|
|
I published my code and deployed it in server.
when i open some pages i am getting this error.
An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
|
|
|
|