I have done my project in .net When i run my defualt.aspx, sometime it will show runtime error at web config. But sometime it will not. What will this issue cause by? the description of my error is: Description: 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.
LovelyHelp
Posts
-
Run time error -
next buttonI am using asp. I will like my code to generate next button if my pageitem is more than 5. it each each row it will only display 5 items. once the row ismore than 5 items, it iwll have next button which user can click onnext button. now my code is like this <% i=1 do until prodSet.EOF if not i mod 4 = 0 then %> <% else %> <% ii=1 do until prodSet1.EOF if not ii mod 4 = 0 then %> <%else%> <% end if ii=ii+1 prodSet1.MoveNext Loop %> <% end if i=i+1 prodSet.MoveNext Loop %>
">" border="0">
">" border="0">
<%=prodSet1("prod1_name")%>
<%=prodSet1("prod1_name")%>
-
How to add all value from checkbox listI trying to loop too but i failed. What is the syntax for looping. BElow is what i done but it is wrong. Dim i As Integer For i = 0 To chkpackage.SelectedItem.Count - 1 mycommand2.Parameters.Add("@packageid", SqlDbType.Int, 4).Value = chkpackage.SelectedItem.Value End If Next
-
How to add all value from checkbox listHow am i to insert all my selected items from checkbox list to my database. Right now i only able to insert 1 item to my database even I have select 2 items from my checkboxlist. my code is as below. mycommand2 = New SqlCommand("INSERT INTO t_userpackage (userID, packageID) VALUES (@userid, @packageid)", myconnection) mycommand2.Parameters.Add("@userid", SqlDbType.Int, 4).Value = ddluser.SelectedValue mycommand2.Parameters.Add("@packageid", SqlDbType.Int, 4).Value = chkpackage.SelectedItem.Value mycommand2.ExecuteNonQuery()
-
How should my database likeOH many to many is such a complicated relationship for me. maybe should we start with the UI first. To display my item, should I use datalist or datagrid? I need to show something like: Tutorial's name Tutorial description but is optional 2 button or maybe link. Where 1st link will be proceed to tutorial if user already pay for it and another link will be purchasing link where it purchase the tutorial. so there is different tutorial. so when example like i have paid for tutorial1 and not paid for tutorial2 then when i click on link 'proceed' for tutorial1 then I will automatically go to tutorial1's pages if i click on tutorial2's 'proceed' button then it will redirect to purchasing pages.
-
How should my database likeoh sorry.. my code is like but i think asp:buttonlink is not allow inside itemtemplate
-
How should my database likeI have some doubted. why are u using SELECT count(*)...? Does count mean counting?. and userID = @userName AND packageID = @packageID userID is int and can it compare with @username which it is varchar? in my database table. I have create something like t_package: packageID (pk), packageName t_user: userID (pk), userName, password, gender.... t_userPackage: userID, packageID
-
How should my database likeI am very new to asp.net and database. Thanks alots and I have learn from you. actually for my function it have something like when user click on the link of particular package then it will run the sql command to check whether have the user pay for the particular package. I am trying to use dataList to build a set of my list so what will be my XXXXXX? is this two line of code cmd.Parameters.Add("@userName", User.Identity.Name); cmd.Parameters.Add("@productID", productID); same as cmdSelect.Parameters.Add("@userName", SqlDbType.VarChar, 50).Value = User.Identity.Name cmdSelect.Parameters.Add("@productID", SqlDbType.Int, 4).Value = XXXXXX I think you are using c right. anyway your technique is new to me.
-
How should my database likeI am actually creating my project in .net. ok now i have my sql command as like this SELECT * FROM t_userPackage INNER JOIN t_package,t_user ON t_userPackage.packageID = t_package.packageID AND userID = '" & User.Identity.Name & AND t_package.packageID=XXXXXXXXX for XXXXXXXX what should I put? my program is when you click on the list, it will then run the sql command to check whethere the specific user have register/pay for the specific package.
-
How should my database like:confused:I am using sql 2000. I have a scenario is 1 user can buy many or 0 'package'. and 1 'package' can have 0 or many users. If the user didnt buy the 'package' then he/she will not allow to use the package. How should I create my database. How is my database look like.
-
after login always go default pageI have my login page using user.authentication when everytime i login, it will go to default page. How to make it when I login, it go back to the page itself. Mean if now i at page1.aspx and I didnt login, so a login form will pop up requeir I to login. After login I want my page to show the page1.aspx but not go to default.aspx Sub Authenticate(ByVal Sender As [Object], ByVal e As EventArgs) Dim u_id As Integer = DBAuthentication(txtUsername.Text, txtPassword.Text) Dim cookie As HttpCookie = FormsAuthentication.GetAuthCookie(txtUsername.Text, chkPersistCookie.Checked) If u_id > 0 Then FormsAuthentication.RedirectFromLoginPage(txtUsername.Text, True) cookie.Expires = DateTime.Now.AddDays(14) Response.Cookies.Add(cookie) Response.Redirect(FormsAuthentication.GetRedirectUrl(txtUsername.Text, chkPersistCookie.Checked)) Else lblMessage.Text = "This login doesn't exits.
" + "Please check your username/password.
" End If End Sub -
Advertisement BannerI might not know how to explain this. But I will try. I will like to do an advertisment banner which it will run out and running on the screen when the current webpage is load. Is there any way to do it? What language should I use?
-
Advertisment BannerI might not know how to explain this. But I will try. I will like to do an advertisment banner which it will run out and running on the screen when the current webpage is load. Is there any way to do it?
-
window.open not functioning<^a class='lesson' href='javascript:window.open('Tutorial/Lesson1/createLayer.htm','pic','width=420,height=520')'>Create Layer
-
How to use frame in asp.netI will like to have the effect like where there is 2 frame. left is my hyperlink and right side is my display. My hyperlink code is as below. How can i employ it to have the effect liek frame? Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not IsPostBack Then Dim conTutorial As SqlConnection Dim cmdSelect As SqlCommand Dim cmdSelect2 As SqlCommand Dim SqlDataAdapter1 As SqlDataAdapter Dim SqlDataAdapter2 As SqlDataAdapter Dim ds As New DataSet() Dim relation As DataRelation Dim Chapter As DataRow Dim Title As DataRow Dim arrRows() As DataRow conTutorial = New SqlConnection("server=localhost;UID=sa;pwd=;database=user") conTutorial.Open() ' call the link_chapter and link_title table cmdSelect = New SqlCommand("select * from t_linkChapter", conTutorial) SqlDataAdapter1 = New SqlDataAdapter(cmdSelect) SqlDataAdapter1.Fill(ds, "t_linkChapter") cmdSelect2 = New SqlCommand("select [link_url],[link_title],[link_titleid],[link_chapterid] from t_linkTitle", conTutorial) SqlDataAdapter2 = New SqlDataAdapter(cmdSelect2) SqlDataAdapter2.Fill(ds, "t_linkTitle") 'call the relationship of two table relation = New DataRelation("linkChapterTitle", ds.Tables("t_linkChapter").Columns("link_chapterid"), ds.Tables("t_linkTitle").Columns("link_chapterid")) ds.Relations.Add(relation) For Each Chapter In ds.Tables("t_linkChapter").Rows arrRows = Chapter.GetChildRows(ds.Relations("linkChapterTitle")) If arrRows.Length > 0 Then hyperlink.Text += "
" hyperlink.Text += "" + Chapter("link_chapter") + "
" hyperlink.Text += "" For Each Title In arrRows hyperlink.Text += "* [" + Title("link_title") + "](" + Title("link_url") + ")
" Next hyperlink.Text += "
" End If Next
-
how to use play soundI will like to play sound when the current page load. I found a code but when i run on my application. The sound didnt play but i hear sound like 'de' instead of my own wav sound. What wrong? Partial Class tutorial Inherits System.Web.UI.Page Dim mrdrreader As SqlDataReader Dim mycommand As SqlCommand Public Class SoundClass Declare Auto Function PlaySound Lib "winmm.dll" (ByVal name As String, ByVal hmod As Integer, ByVal flags As Integer) As Integer ' name specifies the sound file when the SND_FILENAME flag is set. ' hmod specifies an executable file handle. ' hmod must be Nothing if the SND_RESOURCE flag is not set. ' flags specifies which flags are set. ' The PlaySound documentation lists all valid flags. Public Const SND_SYNC = &H0 ' play synchronously Public Const SND_ASYNC = &H1 ' play asynchronously Public Const SND_FILENAME = &H20000 ' name is file name Public Const SND_RESOURCE = &H40004 ' name is resource name or atom Public Sub PlaySoundFile(ByVal filename As String) ' Plays a sound from filename. PlaySound("c:/Inetup/wwwroot/fyp/sounds/newemail.wav", 0, SND_ASYNC) End Sub End Class Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim SoundInst As New SoundClass() SoundInst.PlaySoundFile("c:/Inetup/wwwroot/fyp/sounds/newemail.wav") : :end class
-
how to use radio button in placeholderI have my radio button declare as Dim optMulChoice As New RadioButton() Dim optTrueFalse As New RadioButton() optMulChoice.Text = "Multiple Answer" optMulChoice.GroupName = "rbtType" optMulChoice.ID = "rbtMulChoice" optMulChoice.Checked = True plhHolder.Controls.Add(optMulChoice) optTrueFalse.Text = "True/False" optTrueFalse.GroupName = "rbtType" optTrueFalse.ID = "rbtTrueFalse" plhHolder.Controls.Add(optTrueFalse) which it will keep at place holder. now I will like to insert the selected value into my database when 'ADD' button click. myCommand = New SqlCommand("INSERT INTO t_quiz (q_type) VALUES (@type)", myConnection) myCommand.Parameters.Add("@type", SqlDbType.Bit, 1).Value = rbtType.selectedItem.value But, it showing rbtType is not declare. How am I going to get the value of my selected radio button? What is the correct way to do it?
-
Error when update file nameis anyone can help?
-
window.open not functioningYes it showing the link as below. <^a class='lesson' href='javascript:window.open('Tutorial/Lesson1/createLayer.htm','pic','width=420,height=520')'>Create Layer
- and my file is at inetup/wwwroot/fyp/tutorial/lesson1/createLayer.htm wherby my page is at inetup/wwwtoor/fyp/tutorial.aspx -- modified at 22:12 Friday 21st April, 2006
-
no value selected from DropDownListIs any one can help? I am in urgent. I will like my item to repeat as the number that i have selected from drop downlist.