Jump to content

lovelyhelp

Members
  • Posts

    7
  • Joined

  • Last visited

lovelyhelp's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. 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.I have a headache in my sqlcommandI am using user.identity.name to get my usernamemy database istable t_package: p_id, p_nametable t_user:u_id,u_nametable t_userpackage:p_id, u_idhow shouldmy database look like.the function is, when user click on the list. sqlcommand will check whether have the specific user pay for the specific package. if yes then program will continue if not error msg will shown.if i use dataList control to show my item.How is all my program will look like?
  2. I am building a webpage. I will like to do something like banner advertisment. Which when my page load, the advertisment will pop out and running around the screen. I have no idea how to do it or what languages should i use. Is anyone can help?
  3. I will like to do something like banner advertisment. Which when my page load, the advertisment will pop out and running around the screen. I have no idea how to do it or what languages should i use. Is anyone can help?
  4. i have my code in this way <%@ Import Namespace="System.Data" %><%@ Import Namespace="System.Data.SqlClient" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"> Sub Page_load() If Not IsPostBack Then Dim conTutorial As SqlConnection Dim cmdSelect As SqlCommand Dim dtrLinks As SqlDataReader conTutorial = New SqlConnection("server=localhost;UID=userlogin;psw=119478;database=userlogin") cmdSelect = New SqlCommand("select * from t_hyperlink", conTutorial) conTutorial.Open() dtrLinks = cmdSelect.ExecuteReader() rptLinks.DataSource = dtrLinks rptLinks.Databind() dtrLinks.Close() conTutorial.Close() End If End Sub</script>:: <tr> <td style="width: 110px"> <asp:Repeater ID="rptLinks" runat="Server"> <ItemTemplate> <li> <asp:HyperLink runat="server" Text='<%# container.DataItem("tutorial_subject") %>' NavigateUrl='<%# container.dataitem("tutorial_hyperlink") %>'></asp:HyperLink> </li> </itemtemplate></asp:Repeater>::
  5. the whole things go like this<%@ Page Language="VB" AutoEventWireup="false" CodeFile="newUserRegisteration.aspx.vb" Inherits="newUserRegisteration" %><%@ Import Namespace="System.Data" %><%@ Import Namespace="System.Data.SqlClient" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"> Dim conUserLogin As SqlConnection Dim cmdSelect1 As SqlCommand Dim cmdSelect As SqlCommand Dim parmReturnValue As SqlParameter Dim intResult As Integer Dim dtrclassification As SqlDataReader Sub Page_Load() If Not IsPostBack Then Try conUserLogin = New SqlConnection("server=localhost;UID=userlogin;psw=;database=userLogin") conUserLogin.Open() cmdSelect = New SqlCommand("select user_classification from t_classification", conUserLogin) dtrclassification = cmdSelect.ExecuteReader() ddlClassification.DataSource = dtrclassification ddlClassification.DataTextField = "user_classification" ddlClassification.DataValueField = "id" ddlClassification.DataBind() Catch ex As Exception Response.Write(ex.ToString & "<br>") Finally dtrclassification.Close() conUserLogin.Close() End Try End If End Sub ::<asp:DropDownList ID="ddlClassification" runat="server" Width="86px"></asp:DropDownList>::
  6. i will like to create my dynamic hyperlink in this wayChapter1sub chapter1sub chapter2...Chapter2sub chapter1sub chapter2..all the hyperlink are retrieve from database(sql 2000)what is my table in database should look like? and also how should my code be.
  7. i trying to build a drop down list in my registeration form. my drop downlist is for job title.I have created my database name userlogin and my table t_classification and i have id and u_classification in my table.my script is smtg like this:---------------------------------------------------------------------------Sub Page_Load() If Not IsPostBack Then conUserLogin = New SqlConnection("server=localhost;UID=userlogin;psw=******;database=userLogin") conUserLogin.Open() cmdSelect = New SqlCommand("select u_classification from t_classification", conUserLogin) ddlClassification.DataSource = dtrclassification ddlClassification.DataTextField = "user_classification" ddlClassification.DataBind() dtrclassification.Close() conUserLogin.Close() End If End Sub<asp:DropDownList ID="ddlClassification" runat="server" Width="86px"></asp:DropDownList>---------------------------------------------------------------------------------the problem is there is no item in my dropdown list when i run it.
×
×
  • Create New...