|
1 - put the datalist in the master page, what's the issue ?
2 - use target="_blank" to open a new page
Hard to say why you have an exception without seeing the code. Haven't you been asking this all day ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Why are you using Master Page ?
Do you need to display datalist in each page ?
If yes do one thing instead of putting directly in Master Page
Put the DataList in the ASP.Panel and give it height and width.
You can't put the datalist directly in Contentplaceholder
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... "
Check My Blog
|
|
|
|
|
code is
<asp:contentplaceholder runat="server" id="cph1" xmlns:asp="#unknown">
<asp:panel runat="server" id="pnl1">
<asp:datalist runat="sever" id="dl_1">
---code item template
---code item template and binding
commnad etc working properly but i use iframe for scrolling bar.
but open in iframe panel. not open new page.
|
|
|
|
|
Just remove the ContentPlaceHolder and have your datalist in the Panel
give proper height and width to your Panel
I don't understand why you are using Master Page ?
you should explain the necessity of using the master Page as it is common for all pages to show common Layout
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... "
Check My Blog
|
|
|
|
|
If you are using Masterpage to display it in every page you should you use a common methods class instead. You can put your datalist in there and then call it from each page.
A masterpage is generally used to create a global layout for your application.
|
|
|
|
|
thanks your reply .
i want to know can i do this here like mine method.
and accroding to your method how can i design page through class like i create a datalist and their layout design and then code.
can i do this from classes.
i am new user of asp.net
thanks
|
|
|
|
|
Masterpage is generally used to create a layout for your website.
To create a common methods class just add a new class to your project in the app_code folder and add in your datalist code. Then you just write the name of the class followed by the function name and that will call it from your desired page.
|
|
|
|
|
umeshdaiya wrote: i am new user of asp.net
Having got a 1 for giving a useful answer, I feel compelled to ask what the hell you're doing struggling with this if you're a 'new user of ASP.NET'. Have you bought some books and worked through them ? Read some articles ? Or is someone paying you to bumble through this with our help ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
thanks Mr. Christian Graus, Many many thanks for answering
|
|
|
|
|
You asked, asked again while your question is visible, ( which is very rude ) and then give me a 1 vote for trying to help. So, screw you, and your 'thanks'.
I assume this means I am right, you've bought no books, done no research and you're blindly flailing by asking poorly worded questions over and over. Good luck with that.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
sorry for all disturbances. and sorry if i hurt you.
sorry again i am logout now.
|
|
|
|
|
Thats 1 down Christian many more to go...
|
|
|
|
|
Hello Friends?
How to Hide ToolTip in Crystal Report at runtime & DesignTime ?
|
|
|
|
|
I am using crystal reports in VS 2005 web application which is published on windows 2003 server.
Is it possible that i can get count the number of reports generated in a day.
Any idea ?
The great pleasure in life is doing what people say you cannot do.
|
|
|
|
|
|
hi i am new user of asp.net using c#
in master page there is a datalist in a panel which is filled by category table. but problem is that data goes out from panel. when i use content place holder then problem is that datalist is not filled nullvalue exception given. if i use iframe to solve this problem than problem is that when i click datalist link button to show another information than that show in that i frame not in other portion.
how i solver this problem.
thanks in advance.
|
|
|
|
|
Error 1:
ERROR [NA000] [Microsoft][ODBC driver for Oracle][Oracle]ORA-00604: error occurred at recursive SQL level 1
ORA-01000: maximum open cursors exceeded
Error 2:
ERROR - unable to allocate an environment handle.
Does anyone have the solution for it in VB .NET. would be really grateful.
|
|
|
|
|
Fix your SQL code.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
This is the code. how do i fix it??
Public Function getData(ByVal strSplzCD As String, ByVal strSplzName As String) As clsHrmSplzAreasInfo()
Dim cnn As clsConn
Dim ds As DataSet
Dim dt As DataTable
Dim al As New ArrayList
Dim row As DataRow
Dim arr As Array
Dim str As String
Try
cnn = New clsConn
str = "Select * from HRM_SPLZ_AREAS "
ds = cnn.GetData(str)
dt = ds.Tables(0)
For Each row In dt.Rows
Dim objSplz As New clsHrmSplzAreasInfo
objSplz.SPLZCD = IIf(IsDBNull(row("SPLZ_CD")), "", row("SPLZ_CD")).ToString()
objSplz.SPLZNAME = IIf(IsDBNull(row("SPLZ_NAME")), "", row("SPLZ_NAME")).ToString()
objSplz.ACTVNSTS = IIf(IsDBNull(row("ACTVN_STS")), "", row("ACTVN_STS")).ToString()
objSplz.FNLZSTS = IIf(IsDBNull(row("FNLZ_STS")), "", row("FNLZ_STS")).ToString()
al.Add(objSplz)
Next
arr = al.ToArray(GetType(clsHrmSplzAreasInfo))
Return (arr)
Catch ex As Exception
Throw ex
End Try
End Function
|
|
|
|
|
The error states you have too many cursors open. Are you sure this is the code that creates the error ? If so, I assume HRM_SPLZ_AREAS is not a table, but a view, and that it uses cursors. I am imagining perhaps it doesn't deallocate it's cursors and this is the reason for the issue over time ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
No HRM_SPLZ_AREAS is a table.
The following code is to get the rows.
Public Function GetData(ByVal commandar As String) As DataSet
Dim ds As DataSet
Dim AD As OdbcDataAdapter
Try
If conn.State = ConnectionState.Closed Then
conn = New OdbcConnection("dsn=HurmisSystemOra;UID=hurmisplus;PWD=hurmisplus;")
conn.Open()
Dim Mysql As String
Mysql = "alter session set nls_date_format='DD/MM/YYYY'"
command = New OdbcCommand(Mysql)
command.Connection = conn
command.ExecuteNonQuery()
command = New OdbcCommand(commandar)
command.Connection = conn
Else
Dim Mysql As String
Mysql = "alter session set nls_date_format='DD/MM/YYYY'"
command = New OdbcCommand(Mysql)
command.Connection = conn
command.ExecuteNonQuery()
command = New OdbcCommand(commandar)
command.Connection = conn
End If
ds = New DataSet
AD = New OdbcDataAdapter(command)
AD.Fill(ds, "DataGrid")
AD.Dispose()
Return ds
Catch ex As Exception
Throw ex
End Try
End Function
|
|
|
|
|
OK, and which line, actually blows up ? You're obviously nesting something or somehow creating SQL that kills Oracle.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
'To load in the dropdownlist in GUI
Private Sub Load_Specializaion()
Dim objInfo As New clsHrmSpecializationInfo
Dim objb As New clsHrmSpecializationBL
Try
Me.ddSplz.Items.Clear()
_objSplz = objb.GetSpecializations()'Calls the function in the BUSINESS LAYER
For Each objInfo In _objSplz
Me.ddSplz.Items.Add(New ListItem(objInfo.SPLZNAME, objInfo.SPLZCD))
Next
objb = Nothing
objInfo = Nothing
_objSplz = Nothing
Catch ex As Exception 'THIS IS WHERE THE EXCEPTION IS CAUGHT
objb = Nothing
objInfo = Nothing
_objSplz = Nothing
Throw ex
End Try
End Sub
'BUSINESS LAYER
Public Function GetSpecializations() As clsHrmSpecializationInfo()
Dim objDBSpecialization As New clsHrmSpecializationDL
Return objDBSpecialization.GetData()'Calls the function in the DATA LOGIC LAYER
End Function
'DATA LOGIC LAYER
Public Function GetData() As clsHrmSpecializationInfo()
Dim cnn As clsConn
Dim ds As DataSet
Dim dt As DataTable
Dim al As New ArrayList
Dim row As DataRow
Dim arr As Array
Dim str As String
Try
cnn = New clsConn
str = "Select * from HRM_SPLZ_AREAS "
ds = cnn.GetData(str) 'call the function in DATA ACCESS LAYER
dt = ds.Tables(0)
For Each row In dt.Rows
Dim objSplz As New clsHrmSpecializationInfo
objSplz.SPLZCD = IIf(IsDBNull(row("SPLZ_CD")), "", row("SPLZ_CD")).ToString()
objSplz.SPLZNAME = IIf(IsDBNull(row("SPLZ_NAME")), "", row("SPLZ_NAME")).ToString()
al.Add(objSplz)
Next
arr = al.ToArray(GetType(clsHrmSpecializationInfo))
Return (arr)
Catch ex As Exception
Throw ex
End Try
End Function
'DATA ACCESS LAYER
Public Function GetData(ByVal commandar As String) As DataSet
Dim ds As DataSet
Dim AD As OdbcDataAdapter
Try
If conn.State = ConnectionState.Closed Then
conn = New OdbcConnection("dsn=xxx;UID=xxx;PWD=xxx;")
conn.Open()
Dim Mysql As String
Mysql = "alter session set nls_date_format='DD/MM/YYYY'"
command = New OdbcCommand(Mysql)
command.Connection = conn
command.ExecuteNonQuery()
command = New OdbcCommand(commandar)
command.Connection = conn
Else
Dim Mysql As String
Mysql = "alter session set nls_date_format='DD/MM/YYYY'"
command = New OdbcCommand(Mysql)
command.Connection = conn
command.ExecuteNonQuery()
command = New OdbcCommand(commandar)
command.Connection = conn
End If
ds = New DataSet
AD = New OdbcDataAdapter(command)
AD.Fill(ds, "DataGrid")
AD.Dispose()
Return ds
Catch ex As Exception
Throw ex
End Try
End Function
|
|
|
|
|
OK, and if you set a breakpoint in the code and step through, which line throws it ? The SQL that you're running, what happens when you run it in the Oracle client tools ? Does it happen the first time this code is called ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Hi,
Did anyone can tell me how to send data to an email, here's the situation
I creating aspx page that content of three textbox and one Submit button
First textbox is use to fill Name
Second textbox is use to fill Email Address
Third textbox is use to fill Security Code
After i input all the textbox then i clik the Submit button then i want all the information in all the texbox are send to an email address (let say info@somewebsite.com)
How is the script behind that submit button
Thanks b4
Abbas
|
|
|
|