|
Guffa wrote: The connection fails with the error message "Unspecified error".
The most common reason for this is when you run out of available connections because you haven't closed the previous connections properly.
The database driver only allows 64 simultaneous connections to the database. If you don't close the connections properly, they will remain open until the connection itself times out. When there are 64 connections already open, the database will not accept more connections.
The typical behaviour for this problem is that the database stops accepting connections for a few minutes, then starts working again when one of the connections times out.
Thanks, can I ask, when you say 64 connections, do you mean as in 64 in one instant, i.e. inserting, selecting or updating? Because I am actually opening and closing them at each chance I can. I do, however open the database, then loop the data, open the database depending on which record is open, and sometimes even do that again, which obviously qualifies as 3 opening, however it should be doing that within a matter of seconds surely?
Here's the code from that page:
<% If Request.QueryString("process") = "" And Request.QueryString("name") = "" Then %><br />
<p><a href="index.aspx">Main Menu</a> \ Project Manager \</p><br />
<br />
<table class="Table_General" width="80%" align="center"><br />
<%<br />
Dim dbConn_DiaryPortfolioList As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath(dbLocation) & ";")<br />
dbConn_DiaryPortfolioList.Open()<br />
Dim dbSQL_DiaryPortfolioList As String = "SELECT * FROM tblProcesses ORDER BY proOrder ASC"<br />
Dim dbAdapter_DiaryPortfolioList As New OleDbDataAdapter(dbSQL_DiaryPortfolioList, dbConn_DiaryPortfolioList)<br />
Dim dbDataSet_DiaryPortfolioList As New DataSet<br />
dbAdapter_DiaryPortfolioList.Fill(dbDataSet_DiaryPortfolioList)<br />
Dim dbDataTable_DiaryPortfolioList As DataTable = dbDataSet_DiaryPortfolioList.Tables(0)<br />
Dim dbRecCount_DiaryPortfolioList As Integer = dbDataTable_DiaryPortfolioList.Rows.Count<br />
For dbLoop = 0 To dbRecCount_DiaryPortfolioList - 1<br />
%><br />
<tr><br />
<td class="Cell_Blank" style="height:10px;" width="100%" colspan="3"><br />
</td><br />
</tr><br />
<tr><br />
<td class="Cell_Blank" width="45%" align="center"><br />
<%<br />
Dim dbConn_DiaryPortfolioList_Check1 As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath(dbLocation) & ";")<br />
dbConn_DiaryPortfolioList_Check1.Open()<br />
Dim dbSQL_DiaryPortfolioList_Check1 As String = "SELECT * FROM tblVideos WHERE projProcess = '" & ConvertString(dbDataTable_DiaryPortfolioList.Rows(dbLoop)("proProcess")) & "'"<br />
Dim dbAdapter_DiaryPortfolioList_Check1 As New OleDbDataAdapter(dbSQL_DiaryPortfolioList_Check1, dbConn_DiaryPortfolioList_Check1)<br />
Dim dbDataSet_DiaryPortfolioList_Check1 As New DataSet<br />
dbAdapter_DiaryPortfolioList_Check1.Fill(dbDataSet_DiaryPortfolioList_Check1)<br />
Dim dbDataTable_DiaryPortfolioList_Check1 As DataTable = dbDataSet_DiaryPortfolioList_Check1.Tables(0)<br />
Dim dbRecCount_DiaryPortfolioList_Check1 As Integer = dbDataTable_DiaryPortfolioList_Check1.Rows.Count<br />
dbConn_DiaryPortfolioList.Close<br />
%><br />
<a href="project.aspx?process=<% = dbDataTable_DiaryPortfolioList.Rows(dbLoop)("proProcess") %>" class="Link_Option"><% = dbDataTable_DiaryPortfolioList.Rows(dbLoop)("proOrder") %>. <% = dbDataTable_DiaryPortfolioList.Rows(dbLoop)("proProcess") %></a><br />
</td><br />
<td class="Cell_Blank" width="10%"><br />
</td><br />
<td class="Cell_Blank" width="45%" align="center"><br />
<% If Not dbLoop = dbRecCount_DiaryPortfolioList - 1 Then %><br />
<% dbLoop = dbLoop + 1 %><br />
<%<br />
Dim dbConn_DiaryPortfolioList_Check2 As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath(dbLocation) & ";")<br />
dbConn_DiaryPortfolioList_Check2.Open()<br />
Dim dbSQL_DiaryPortfolioList_Check2 As String = "SELECT * FROM tblVideos WHERE projProcess = '" & ConvertString(dbDataTable_DiaryPortfolioList.Rows(dbLoop)("proProcess")) & "'"<br />
Dim dbAdapter_DiaryPortfolioList_Check2 As New OleDbDataAdapter(dbSQL_DiaryPortfolioList_Check2, dbConn_DiaryPortfolioList_Check2)<br />
Dim dbDataSet_DiaryPortfolioList_Check2 As New DataSet<br />
dbAdapter_DiaryPortfolioList_Check2.Fill(dbDataSet_DiaryPortfolioList_Check2)<br />
Dim dbDataTable_DiaryPortfolioList_Check2 As DataTable = dbDataSet_DiaryPortfolioList_Check2.Tables(0)<br />
Dim dbRecCount_DiaryPortfolioList_Check2 As Integer = dbDataTable_DiaryPortfolioList_Check2.Rows.Count<br />
dbConn_DiaryPortfolioList.Close<br />
%><br />
<a href="project.aspx?process=<% = dbDataTable_DiaryPortfolioList.Rows(dbLoop)("proProcess") %>" class="Link_Option"><% = dbDataTable_DiaryPortfolioList.Rows(dbLoop)("proOrder") %>. <% = dbDataTable_DiaryPortfolioList.Rows(dbLoop)("proProcess") %></a><br />
<% End If %><br />
</td><br />
</tr><br />
<%<br />
Next dbLoop<br />
dbConn_DiaryPortfolioList.Close<br />
%><br />
</table><br />
<br />
<% ElseIf Request.QueryString("process") <> "" And Request.QueryString("name") = "" Then %><br />
<p><a href="index.aspx">Main Menu</a> \ <a href="project.aspx">Project Manager</a> \ <% = Request.QueryString("process") %> \</p><br />
<br />
<table class="Table_General" width="95%" align="center"><br />
<tr><br />
<td class="<% If Request.QueryString("tab") = "" Then %>Cell_Header<% Else %>Cell_Body<% End If %>" width="16%" align="center"><br />
<a href="project.aspx?process=<% = Request.QueryString("process") %>">Videos</a><br />
</td><br />
<td class="<% If Request.QueryString("tab") = "Project Presentations" Then %>Cell_Header<% Else %>Cell_Body<% End If %>" width="16%" align="center"><br />
<a href="project.aspx?process=<% = Request.QueryString("process") %>&tab=Project Presentations">Project Presentations</a><br />
</td><br />
<td class="<% If Request.QueryString("tab") = "Support Presentations" Then %>Cell_Header<% Else %>Cell_Body<% End If %>" width="16%" align="center"><br />
<a href="project.aspx?process=<% = Request.QueryString("process") %>&tab=Support Presentations">Support Presentations</a><br />
</td><br />
<td class="<% If Request.QueryString("tab") = "Portfolio Tasks" Then %>Cell_Header<% Else %>Cell_Body<% End If %>" width="16%" align="center"><br />
<a href="project.aspx?process=<% = Request.QueryString("process") %>&tab=Portfolio Tasks">Portfolio Tasks</a><br />
</td><br />
<td class="<% If Request.QueryString("tab") = "Handouts" Then %>Cell_Header<% Else %>Cell_Body<% End If %>" width="16%" align="center"><br />
<a href="project.aspx?process=<% = Request.QueryString("process") %>&tab=Handouts">Handouts</a><br />
</td><br />
<td class="<% If Request.QueryString("tab") = "Lesson Notes" Then %>Cell_Header<% Else %>Cell_Body<% End If %>" width="16%" align="center"><br />
<% If Session("usertype") = "Staff" Then %><br />
<a href="project.aspx?process=<% = Request.QueryString("process") %>&tab=Lesson Notes">Lesson Notes</a><br />
<% End If %><br />
</td><br />
</tr><br />
<tr><br />
<td class="Cell_Body" width="100%" colspan="6"><br />
<br/><br />
<% If Request.QueryString("tab") = "" Then %><br />
<table class="Table_General" width="200" align="center"><br />
<tr><br />
<td class="Cell_Blank" width="100%" align="center"><br />
<a href="http://www.macromedia.com/go/getflashplayer" target="_blank"><img src="http://www.adobe.com/support/programs/mwm/images/get_flashplayer.gif" border="0"/></a><br />
</td><br />
</tr><br />
<tr><br />
<td class="Cell_Blank" width="100%" align="center"><br />
This section requires Adobe Flash.<br />
</td><br />
</tr><br />
</table><br />
<br />
<br/><br />
<br />
<table class="Table_General" width="60%" align="center"><br />
<tr><br />
<td class="Cell_Header" width="100%"><br />
Organisation Type: <asp:dropdownlist id="lstDiaryPortfolioView_Type" autopostback="true" runat="server"><br />
<asp:listitem>All</asp:listitem><br />
<asp:listitem>Private Sector</asp:listitem><br />
<asp:listitem>Public Sector</asp:listitem><br />
<asp:listitem>Not For Profit</asp:listitem><br />
</asp:dropdownlist><br />
<br />
<asp:dropdownlist id="lstDiaryPortfolioView_Size" autopostback="true" runat="server"><br />
<asp:listitem>All</asp:listitem><br />
<asp:listitem>Small</asp:listitem><br />
<asp:listitem>Medium</asp:listitem><br />
<asp:listitem>Large</asp:listitem><br />
</asp:dropdownlist><br />
</td><br />
</tr><br />
</table><br />
<br />
<br/><br />
<br />
<table class="Table_General" width="95%" align="center"><br />
<%<br />
Dim dbConn_DiaryPortfolioView As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath(dbLocation) & ";")<br />
dbConn_DiaryPortfolioView.Open()<br />
Dim dbSQL_DiaryPortfolioView As String<br />
If lstDiaryPortfolioView_Type.SelectedItem.Text = "All" Then<br />
If lstDiaryPortfolioView_Size.SelectedItem.Text = "All" Then<br />
dbSQL_DiaryPortfolioView = "SELECT * FROM tblVideos WHERE projProcess = '" & Request.QueryString("process") & "' ORDER BY projName ASC"<br />
Else<br />
dbSQL_DiaryPortfolioView = "SELECT * FROM tblVideos WHERE projProcess = '" & Request.QueryString("process") & "' AND projSize = '" & lstDiaryPortfolioView_Size.SelectedItem.Text & "' ORDER BY projName ASC"<br />
End If<br />
Else<br />
If lstDiaryPortfolioView_Size.SelectedItem.Text = "All" Then<br />
dbSQL_DiaryPortfolioView = "SELECT * FROM tblVideos WHERE projProcess = '" & Request.QueryString("process") & "' AND projType = '" & lstDiaryPortfolioView_Type.SelectedItem.Text & "' ORDER BY projName ASC"<br />
Else<br />
dbSQL_DiaryPortfolioView = "SELECT * FROM tblVideos WHERE projProcess = '" & Request.QueryString("process") & "' AND projType = '" & lstDiaryPortfolioView_Type.SelectedItem.Text & "' AND projSize = '" & lstDiaryPortfolioView_Size.SelectedItem.Text & "' ORDER BY projName ASC"<br />
End If<br />
End If<br />
Dim dbAdapter_DiaryPortfolioView As New OleDbDataAdapter(dbSQL_DiaryPortfolioView, dbConn_DiaryPortfolioView)<br />
Dim dbDataSet_DiaryPortfolioView As New DataSet<br />
dbAdapter_DiaryPortfolioView.Fill(dbDataSet_DiaryPortfolioView)<br />
Dim dbDataTable_DiaryPortfolioView As DataTable = dbDataSet_DiaryPortfolioView.Tables(0)<br />
Dim dbRecCount_DiaryPortfolioView As Integer = dbDataTable_DiaryPortfolioView.Rows.Count<br />
For dbLoop = 0 To dbRecCount_DiaryPortfolioView - 1<br />
%><br />
<tr><br />
<td class="Cell_Blank" width="33%" valign="top"><br />
<table class="Table_General" width="95%" align="center"><br />
<tr><br />
<td class="Cell_Header" width="100%"><br />
<a href="project.aspx?process=<% = Request.QueryString("process") %>&name=<% = dbDataTable_DiaryPortfolioView.Rows(dbLoop)("projName") %>"><img src="player/<% = dbDataTable_DiaryPortfolioView.Rows(dbLoop)("projImage") %>" border="0"/></a><br />
</td><br />
</tr><br />
<tr><br />
<td class="Cell_Body" width="100%" height="120" valign="top"><br />
<p align="center"><% = dbDataTable_DiaryPortfolioView.Rows(dbLoop)("projName") %></p><br />
<p><% = Left(dbDataTable_DiaryPortfolioView.Rows(dbLoop)("projAbout"), 100) %>...</p><br />
<p>Type: <% = dbDataTable_DiaryPortfolioView.Rows(dbLoop)("projType") %><br/><br />
Size: <% = dbDataTable_DiaryPortfolioView.Rows(dbLoop)("projSize") %></p><br />
</td><br />
</tr><br />
</table><br />
</td><br />
<td class="Cell_Blank" width="33%" valign="top"><br />
<% If Not dbLoop = dbRecCount_DiaryPortfolioView - 1 Then %><br />
<% dbLoop = dbLoop + 1 %><br />
<table class="Table_General" width="95%" align="center"><br />
<tr><br />
<td class="Cell_Header" width="100%"><br />
<a href="project.aspx?process=<% = Request.QueryString("process") %>&name=<% = dbDataTable_DiaryPortfolioView.Rows(dbLoop)("projName") %>"><img src="player/<% = dbDataTable_DiaryPortfolioView.Rows(dbLoop)("projImage") %>" border="0"/></a><br />
</td><br />
</tr><br />
<tr><br />
<td class="Cell_Body" width="100%" height="120" valign="top"><br />
<p align="center"><% = dbDataTable_DiaryPortfolioView.Rows(dbLoop)("projName") %></p><br />
<p><% = Left(dbDataTable_DiaryPortfolioView.Rows(dbLoop)("projAbout"), 100) %>...</p><br />
<p>Type: <% = dbDataTable_DiaryPortfolioView.Rows(dbLoop)("projType") %><br/><br />
Size: <% = dbDataTable_DiaryPortfolioView.Rows(dbLoop)("projSize") %></p><br />
</td><br />
</tr><br />
</table><br />
<% End If %><br />
</td><br />
<td class="Cell_Blank" width="33%" valign="top"><br />
<% If Not dbLoop = dbRecCount_DiaryPortfolioView - 1 Then %><br />
<% dbLoop = dbLoop + 1 %><br />
<table class="Table_General" width="95%" align="center"><br />
<tr><br />
<td class="Cell_Header" width="100%"><br />
<a href="project.aspx?process=<% = Request.QueryString("process") %>&name=<% = dbDataTable_DiaryPortfolioView.Rows(dbLoop)("projName") %>"><img src="player/<% = dbDataTable_DiaryPortfolioView.Rows(dbLoop)("projImage") %>" border="0"/></a><br />
</td><br />
</tr><br />
<tr><br />
<td class="Cell_Body" width="100%" height="120" valign="top"><br />
<p align="center"><% = dbDataTable_DiaryPortfolioView.Rows(dbLoop)("projName") %></p><br />
<p><% = Left(dbDataTable_DiaryPortfolioView.Rows(dbLoop)("projAbout"), 100) %>...</p><br />
<p>Type: <% = dbDataTable_DiaryPortfolioView.Rows(dbLoop)("projType") %><br/><br />
Size: <% = dbDataTable_DiaryPortfolioView.Rows(dbLoop)("projSize") %></p><br />
</td><br />
</tr><br />
</table><br />
<% End If %><br />
</td><br />
</tr><br />
<%<br />
Next dbLoop<br />
dbConn_DiaryPortfolioView.Close<br />
%><br />
</table><br />
<br />
<% Else %><br />
<%<br />
Dim SupportWork_UserType As String<br />
If Session("usertype") = "Staff" Then<br />
SupportWork_UserType = "Staff"<br />
Else<br />
SupportWork_UserType = "Student"<br />
End If<br />
<br />
Dim dbConn_SupportWork As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath(dbLocation) & ";")<br />
dbConn_SupportWork.Open()<br />
Dim dbSQL_SupportWork As String = "SELECT * FROM tblSupportWork WHERE supProcess = '" & Request.QueryString("process") & "' AND supArea = '" & Request.QueryString("tab") & "' AND supUser = '" & SupportWork_UserType & "' ORDER BY supName ASC"<br />
Dim dbAdapter_SupportWork As New OleDbDataAdapter(dbSQL_SupportWork, dbConn_SupportWork)<br />
Dim dbDataSet_SupportWork As New DataSet<br />
dbAdapter_SupportWork.Fill(dbDataSet_SupportWork)<br />
Dim dbDataTable_SupportWork As DataTable = dbDataSet_SupportWork.Tables(0)<br />
Dim dbRecCount_SupportWork As Integer = dbDataTable_SupportWork.Rows.Count<br />
For dbLoop = 0 To dbRecCount_SupportWork - 1<br />
%><br />
» <a href="ProjectHelp/<% = Request.QueryString("process") %>/<% = SupportWork_UserType %>/<% = dbDataTable_SupportWork.Rows(dbLoop)("supArea") %>/<% = dbDataTable_SupportWork.Rows(dbLoop)("supURL") %>"><% = dbDataTable_SupportWork.Rows(dbLoop)("supName") %></a><br/><br />
<%<br />
Next dbLoop<br />
dbConn_SupportWork.Close<br />
%><br />
<% End If %><br />
</td><br />
</tr><br />
</table><br />
<br />
<% ElseIf Request.QueryString("process") <> "" And Request.QueryString("name") <> "" Then %><br />
<p><a href="index.aspx">Main Menu</a> \ <a href="project.aspx">Project Manager</a> \ <a href="project.aspx?process=<% = Request.QueryString("process") %>"><% = Request.QueryString("process") %></a> \ <% = Request.QueryString("name") %> \</p><br />
<br />
<%<br />
Dim dbConn_DiaryPortfolioView_Content As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath(dbLocation) & ";")<br />
dbConn_DiaryPortfolioView_Content.Open()<br />
Dim dbSQL_DiaryPortfolioView_Content As String = "SELECT * FROM tblVideos WHERE projProcess = '" & Request.QueryString("process") & "' AND projName = '" & Request.QueryString("name") & "'"<br />
Dim dbAdapter_DiaryPortfolioView_Content As New OleDbDataAdapter(dbSQL_DiaryPortfolioView_Content, dbConn_DiaryPortfolioView_Content)<br />
Dim dbDataSet_DiaryPortfolioView_Content As New DataSet<br />
dbAdapter_DiaryPortfolioView_Content.Fill(dbDataSet_DiaryPortfolioView_Content)<br />
Dim dbDataTable_DiaryPortfolioView_Content As DataTable = dbDataSet_DiaryPortfolioView_Content.Tables(0)<br />
Dim dbRecCount_DiaryPortfolioView_Content As Integer = dbDataTable_DiaryPortfolioView_Content.Rows.Count<br />
For dbLoop = 0 To dbRecCount_DiaryPortfolioView_Content - 1<br />
%><br />
<table class="Table_General" width="100%" align="center"><br />
<tr><br />
<td class="Cell_Blank" width="100%" align="center" colspan="2"><br />
<h1><% = dbDataTable_DiaryPortfolioView_Content.Rows(dbLoop)("projName") %></h1><br />
</td><br />
</tr><br />
<tr><br />
<td class="Cell_Blank" width="60%" align="center"><br />
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"<br />
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="402" height="352"><br />
<param name="movie" value="player/player.swf?file=http://www.ellowes.co.uk/elg/<% = dbDataTable_DiaryPortfolioView_Content.Rows(dbLoop)("projVideo") %>.flv&bufferTime=3&autoStart=false"/><br />
<param name="quality" value="high"/><br />
<embed src="player/player.swf?file=http://www.ellowes.co.uk/elg/<% = dbDataTable_DiaryPortfolioView_Content.Rows(dbLoop)("projVideo") %>.flv&bufferTime=3&autoStart=false" quality="high"<br />
pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="402" height="352"/><br />
</object><br />
</td><br />
<td class="Cell_Blank" width="60%"><br />
<p>About</p><br />
<p><% = dbDataTable_DiaryPortfolioView_Content.Rows(dbLoop)("projAbout") %></p><br />
<br />
<table class="Table_General" width="200" align="center"><br />
<tr><br />
<td class="Cell_Blank" width="100%" align="center"><br />
<a href="http://www.macromedia.com/go/getflashplayer" target="_blank"><img src="http://www.adobe.com/support/programs/mwm/images/get_flashplayer.gif" border="0"/></a><br />
</td><br />
</tr><br />
<tr><br />
<td class="Cell_Blank" width="100%" align="center"><br />
The Enterprise Learning Gateway requires Adobe Flash to use some areas.<br />
</td><br />
</tr><br />
</table><br />
</td><br />
</tr><br />
</table><br />
<%<br />
Next dbLoop<br />
dbConn_DiaryPortfolioView_Content.Close<br />
%><br />
<% End If %>
Is SQL Server any better in performace? Cheers
|
|
|
|
|
No wonder that you are running out of connections. You open a new connection (dbConn_DiaryPortfolioList_Check1) for every record in tblProcesses, and you never close them. Same with dbConn_DiaryPortfolioList_Check2. After that I gave up trying to follow the code.
Frankly, your code is a mess. It doesn't look as ASP.NET code at all, it looks like badly written ASP code. You really need to learn how to use codebehind, server controls, repeaters, databinding, et.c.
Making queries inside a loop is very bad practice. You should create a query that fetches all the data that you need for all projects at once. Read up on the JOIN command in SQL.
Normally you should only need a single database connection for a page. Try to fetch all the data that you need for the page, close the connection, then put the data into the page.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi,
How to write a DateValidator which should allow both dates in dd/mm/yyyy and mm/dd/yyyy.
Thanks,
Prajin
|
|
|
|
|
|
Hai there..
I want to create an installer. With that installer, if i'm installing means, it should install one more (.msi) file automatically without asking anything. Second time if same installer i'm installing means, it should not install. First it should check whether that file exists or not, then only it should proceed. Please guide me.
Regards n Thks
Sam.M
|
|
|
|
|
Did you look at the setup and deployment options in visual studio?
|
|
|
|
|
ya, but i want to create a setup that should automatically install another msi file.
Actually i created a project, there i included AJAX extensoions. But i've to give an installer file to my clients. So if they install my project, i want to install AJAX exteionsions automatically.
Pls Help.
Regards n Thks
Sam.M
|
|
|
|
|
|
Hello frnds,
Can i disable the saveAS option of IExplorer
if yes ...then plss help
thankx in advance
regards,
koolprasad2003
be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
No. The best you can have a new window sans menu bar.
|
|
|
|
|
|
That comes into picture for setting up IE from Administrator perspective. He is asking from a website point of view right?
In IE 6.0+, for HTTPS, ViewSource is anyway is disabled to prevent saving. This is controlled from Tools -> Internet Options -> Advanced -> Security.
|
|
|
|
|
Vasudevan Deepak Kumar wrote: That comes into picture for setting up IE from Administrator perspective.
Yes I know. That's why I put Joke message Icon . Do you think his question has an effective solution. I have seen in wikipedia, when we save pages, design will get disturbed. And in Gmail if we use saveas option from inbox, nothing will be saved. No idea that how they are doing
|
|
|
|
|
Hi all ..,
in .net 2003, in the Html view with in the body there we got onload="" event which fire during the page is loding
like
Now we are migrating the 2003 application(Already developed) to the 2005...here we are using master pages ...In all the webpages am using master pages
while doing that in the HTml view there is no body tag(and onload="" attribute) for the content pages..But it is must to call
alertmsg(); while loding the page ..So plz let me have some solution to solve this scenario or send some related articles ...
Thanks in advance
yuva
|
|
|
|
|
Instead of doing alert messages using the onload function why don't you look at the Page.ClientScript.RegisterClientScriptBlock method in the code behind page.
Michael
I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious.
Vince Lombardi (1913-1970)
|
|
|
|
|
Hi
I want to set calender control default year.i.e When page is loaded
calender control should displayed default year as 1983
instead of 2007.How can i do this.
Thanks.
Rahul.
df
|
|
|
|
|
Calendar1.VisibleDate = New DateTime(year, month, day)
following is example
Calendar1.VisibleDate = New DateTime(1983, 10, 23)
i think ur problem has solved
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
Thanks.
Its working.My problem is solved.
df
|
|
|
|
|
use SelectedDate property to assign date
Nobody is perfect i'm Nobody
|
|
|
|
|
hay guys i am still beginner in asp.net whn i tryed this code i got the "index out the bound of array"
so plzz help me in this error
Dim MyConn As New SqlConnection("Data Source=ASMAA-PC;Initial Catalog=LogFinity;Integrated Security=True")
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load, Me.Load
'Dim conn As String = "Data Source=ASMAA-PC;Initial Catalog=LogFinity;Integrated Security=True"
Dim MyAdapter As New SqlDataAdapter
MyConn.Open()
MyAdapter.SelectCommand = New SqlCommand("Select * from RecCalls", MyConn)
Try
MyAdapter.Fill(CallDS)
Finally
MyConn.Close()
End Try
End Sub
Public Sub RadGrid1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGrid1.SelectedIndexChanged
Dim Ids As String = (RadGrid1.SelectedItems(0).OwnerTableView.DataKeyValues(RadGrid1.SelectedItems(0).ItemIndex)("ID"))
Dim dr() As DataRow = CallDS.Tables("RecCalls").Select("ID = '" + Ids + "'")
If dr.Length > 0 Then
lblCallDate.Text = CStr(dr(0)("PCName"))
Return
Else
lblCallDate.Text = [String].Empty
End If
End Sub
Developer
|
|
|
|
|
devsam wrote: Public Sub RadGrid1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGrid1.SelectedIndexChanged
Dim Ids As String = (RadGrid1.SelectedItems(0).OwnerTableView.DataKeyValues(RadGrid1.SelectedItems(0).ItemIndex)("ID"))
Your code is going in selected index change before there is any item in the grid. Write a check, something like this:
IF NOT RadGrid1.SelectedItems.Count = 0 THEN
and then write your code inside this If condition.
|
|
|
|
|
its not working with me..i got the same error
is there another way to do that
Developer
|
|
|
|
|
Don't post the same question multiple times.
Apurva Kaushal
|
|
|
|
|
hay guys i am still beginner in asp.net whn i tryed this code i got the "index out the bound of array"
so plzz help me in this error
Dim MyConn As New SqlConnection("Data Source=ASMAA-PC;Initial Catalog=LogFinity;Integrated Security=True")
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load, Me.Load
'Dim conn As String = "Data Source=ASMAA-PC;Initial Catalog=LogFinity;Integrated Security=True"
Dim MyAdapter As New SqlDataAdapter
MyConn.Open()
MyAdapter.SelectCommand = New SqlCommand("Select * from RecCalls", MyConn)
Try
MyAdapter.Fill(CallDS)
Finally
MyConn.Close()
End Try
End Sub
Public Sub RadGrid1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGrid1.SelectedIndexChanged
Dim Ids As String = (RadGrid1.SelectedItems(0).OwnerTableView.DataKeyValues(RadGrid1.SelectedItems(0).ItemIndex)("ID"))
Dim dr() As DataRow = CallDS.Tables("RecCalls").Select("ID = '" + Ids + "'")
If dr.Length > 0 Then
lblCallDate.Text = dr(0)("SELECT * FROM RecCalls Where id = '" + Ids + "'")
Return
Else
lblCallDate.Text = [String].Empty
End If
End Sub
Developer
|
|
|
|
|
hi
can any body help me find ASp.net 2.0 rss feed sorcecode or toolkit all the feeds i have been able to find shows they are 2.0 compatible but all have 1.0 sorce code
Can any body help please and please send me a link how to implement that
regards
HArry
|
|
|
|