jbisono 51 Posting Pro in Training

You can use a datatable instead

DataSet dsResult = new DataSet();
DataRow drRev;
DataTable dtRev = new DataTable();
dtRev.Columns.Add("Name");
dtRev.Columns.Add("Number");
For(int i =0; i < 3; i++)
{
     drRev = dtRev.NewRow();
     drRev[0] = "Ramon"; 
     drRev[1] = i.ToString();
     dtRev.Rows.Add(drRev);
}
dsResult.Tables.Add(dtRev);
GridView1.DataSource = dsResult;
GridView1.DataBind();

and that case you can manipulate the data before bind the datagrid hope that help you.

jbisono 51 Posting Pro in Training

you need this

if(ContractID_Reader2.HasRows)
{
     while(ContractID_Reader2.Read())
     {
           //Your code here
     }
}
jbisono 51 Posting Pro in Training

you have to do something like this.

foreach (Control cn in form1.Controls)
            {
                if (cn.GetType().Name == "RadioButton")
                {
                    RadioButton rd = (RadioButton)cn;
                    if (rd.GroupName == "a" && rd.Checked)
                    {
                        TextBox1.Text = rd.Text;
                    }
                }
            }
jbisono 51 Posting Pro in Training

In fact that is the problem that the hyperlinkcolumn does not have the CommandName property.

jbisono 51 Posting Pro in Training

Ok so then you have to add to the bin folder in your project two dll files System.Web.Extensions.Design.dll and System.Web.Extensions.dll you can find these files under this path usually C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025 hope that help you.

jbisono 51 Posting Pro in Training

Hi, friends i have a datagrid bound a hypercolumn

<asp:DataGrid ID="menu" AutoGenerateColumns="False" Runat="server">
<Columns>
<asp:HyperLinkColumn   DataTextField="OPT_DESC" DataNavigateUrlField="OPT_LINK" 	DataNavigateUrlFormatString="{0}"/>
</Columns>
</asp:DataGrid>

basically what i want to do is, that i want to insert into the database the users that click some links. so how can i make a clickevent in this case thanks.

jbisono 51 Posting Pro in Training

I do not really sure if this is what you want but in aspx i do this.

foreach (Control cd in form1.Controls)
            {
                if (cd.GetType().Name == "TextBox")
                {
                    TextBox txt = (TextBox)cd;
                    txt.Text = "hello";
                }
            }

regards

jbisono 51 Posting Pro in Training

you need to import System.Data.SqlClient; then you can say this.

Dim con = new SqlConnection("Initial Catalog=DBName;Data Source=ServerName;UID=User;PWD=Pass;");
con.Open()
//Some code here
con.Close()

with that piece of code you can establish the connection and open it.

regards.

jbisono 51 Posting Pro in Training

was the update related to asp.net ajax?

jbisono 51 Posting Pro in Training

Try using this code

cmd.Parameters.Add("@YourField", SqlDbType.VarChar).Value = "Value"
jbisono 51 Posting Pro in Training

into the try clause

connection.Open();
cmd.ExecuteNonQuery();
connection.Close();

regards

jbisono 51 Posting Pro in Training

Object database (also object-oriented database).

jbisono 51 Posting Pro in Training

when you said lively network means intranet? well in that case you will need a computer to become a web server, with IIS Installed or Apache or other tool that allow the intranet's users to browse the web server, anyway if you are running xp, i recommend you try IIS.
some sites you can look some info.
http://support.microsoft.com/kb/323972

http://www.no-ip.com/support/guides/web_servers/setting_up_iis.html

jbisono 51 Posting Pro in Training

The only thing i can see is, I know the fact that it is an anonymous mobile message board, but if in the future you expect to open the software to Non anonymous only, I would say make another table for the users and just include anonymous and put a foreign key in your post table. in that way if for any reason you would like to record some other info about the user you wont have redundancy.

I hope my feedback help you a little bit, regards.

jbisono 51 Posting Pro in Training

Welcome, see you around.

jbisono 51 Posting Pro in Training

Ok, good to know.
take care.

jbisono 51 Posting Pro in Training

at the end put DataGrid.DataBind()

also is your datagrid allow to generate the columns automatically, if not i would like to see the datagrid structure and the exact field you are retrieving from the calendar table

Regards.

jbisono 51 Posting Pro in Training

anytime, take care.

jbisono 51 Posting Pro in Training

In the first select statement, into the where clause after names.contact_id you have a "," that is wrong.

jbisono 51 Posting Pro in Training

When you try to browse internet from xp, what is the exact error if there is one?.

jbisono 51 Posting Pro in Training

I do not see any benefit creating another table,
First you are retrieving a specific value without any join or combined statement. In the other hand you right if you retrieve smaller record you have better efficiency, but the question is, is it worth the difference between the retrieving time? in this specific case I bet you not, besides creating another table is going to add another procedure to maintain two tables at the same time.

Regards.

jbisono 51 Posting Pro in Training

Try to run a windows update and then give it a shot, let us know. also make sure the clock and date in your computer is correct.

jbisono 51 Posting Pro in Training

Lets say that in the loadmain you set text for a label like this
Label1.Text = "Load Main"
But you want to do the same thing if you click a button, then create a function called for example

private void SetLabel()
{
Label1.Text = "Load Main"
}

then your load main will have this

private void LoadMain()
{
SetLabel()
}

and the button event

private void buttonevent()
{
SetLabel()
}

I hope you understand the idea. regards

jbisono 51 Posting Pro in Training

why dont you pass the login parameters in the select statement and if datareader has any rows it means that user exist.

jbisono 51 Posting Pro in Training

Something like this.

OleDbDataReader dr;
OleDbCommand cmd = New OleDbCommand("select * from login where id= '"+txtUser.Text+"' and pass='"+txtPwd.Text+"'", conn);
        dr = cmd.ExecuteReader();
        if(dr.HasRows)
            Form2.Show();
        Else
{
            txtUser.Clear();
            txtPwd.Clear();
            txtUser.Focus();
}

regards

jbisono 51 Posting Pro in Training

Check this thread http://www.daniweb.com/forums/thread190964.html and let me know.

regards.

jbisono 51 Posting Pro in Training

Take a look of this thread http://www.daniweb.com/forums/thread203951.html

if still need help let me know.

jbisono 51 Posting Pro in Training

Yes the above select statement is correct, but remember you will need a dataset or datareader to fetch more than one column as follow.

SqlCommand sqlcmd = new SqlCommand("Select Password,firstname from <Table name> Where UserName = '"+textBox1.Text+"'", con);
con.Open();
SqlDataReader dr = sqlcmd.ExecuteReader();
While(dr.Read())
{
TextBox2.Text = dr.GetString(0);
TextBox3.Text = dr.GetString(1);
}
dr.Close();
con.Close();

Regards

jbisono 51 Posting Pro in Training

First if you do not want high cost, To install a server for MSQL SERVER 2005, I will cut that off right away.
CakePhp I cannot say too much about that i have not tried.

anyway for me, the best two options you have is Number 2 and 4, both technology work great each one with its partner database server, eventhougt the second one has low cost base on my experience.

also if you need to hire someone for supporting, is going to be easy to find somebody to fit the position because there is a lot of programmer out there than work very well with such technologies.

regards.

jbisono 51 Posting Pro in Training

Im not quite sure what is your problem, but did you try Response.Redirect(String URL);

jbisono 51 Posting Pro in Training

First you do not need to retrieve the username because is given as parameter. base on what you said.
Under the button search click event you will have a code like this.

SqlConnection con = new SqlConnection("Data Source=.\\SQLEXPRESS;Initial Catalog=ex;Integrated Security=True;Pooling=False");
/*This only work if you are going to retrieve just the password otherwise you will need a dataset or datareader.*/
SqlCommand sqlcmd = new SqlCommand("Select Password from YourTable Where UserName = '"+textBox1.Text+"'", con);
con.Open();
textBox2.Text = Convert.ToString(sqlcmd.ExecuteScalar());
con.Close();
jbisono 51 Posting Pro in Training

In my opinion, regardless the operation in issue (Insert a new record or displaying data from db) you need to fill the dropdown with all values from genre table.

Now if you want to display a specific genre belongs to a movie i guess you will have a datareader or something like that to retreive those values, select MovieID, MovieName, GenreFK from movies now the c# is imagine the datareader is called dr

DropDown.Items.FindByValue(dr[2]).Selected = true;

remember for dr[2] you have to make the cast to integer if its the case.

jbisono 51 Posting Pro in Training

Ok, first i imagine you have a dropdownlist to display all genres in the new movie entry form. is that is the case you will have a select statment like. select GenreID, GenreName from Genre then fill a dataset with that result, lets say the dataset is called dsGenres so to fill the dropdown you will have this.

DropDown.DataSource = dsGenre;
DropDown.DataTextField = "GenreName";
DropDown.DataValueField = "GenreID";
DropDown.DataBind();

Then to retrieve the key in the insert statement you need to say this

DropDown.SelectedItem.Value;

I hope that help you a little bit.

jbisono 51 Posting Pro in Training

hi,
what you need is just this

this.drpDMSType.Items.FindByText((string)tblDMS.Rows[0]["dms_type_alias"]).Selected = true;

take care.

jbisono 51 Posting Pro in Training

Let's say you have a variable temp

Dim temp As String = "05/02/2005"
Dim ar() As String = temp.Split("/")
TextBox1.Text = ar(0)

The result of ar(0) is 05 i hope that help you.

jbisono 51 Posting Pro in Training

make sure you have permissions to access and write into the database, also double check the path of the connection string, maybe you should test the connection first without trying the insert to see what happen.

here some connection string exampleshttp://www.sqlstrings.com/MS-Access-connection-strings.htm

regards.

jbisono 51 Posting Pro in Training

after you open the connection you should say this

objCmd.ExecuteNonQuery();

regards.

jbisono 51 Posting Pro in Training

The easiest way to do it is with a compare validator control <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="DropDownList2" ControlToValidate="DropDownList1" Type="Integer" Operator="LessThan" ErrorMessage="DropDownList2 must be greater than DropDownList1" Display="dynamic"></asp:CompareValidator> DropDownList2 is the ToYr and DropDownList1 is FromYr

regards.

jbisono 51 Posting Pro in Training

try use this dropdown.SelectedItem.Value to retrieve the values from the drop down box.

regards.

jbisono 51 Posting Pro in Training

In that case you right. and also check what samir said and post back if there was any enhanced.

jbisono 51 Posting Pro in Training

First of all to retrieve the ID, I would not use DataReader but this

id = Convert.ToInt32(oledbcom.ExecuteScalar())

and for the rest of the code, make sure your connection is open.

jbisono 51 Posting Pro in Training

Ok, thanks for your help, I will be playing around with some of it. I let you know how i am doing.

Regards.

jbisono 51 Posting Pro in Training

You're saying populate the menu manually thru a sitemap?

jbisono 51 Posting Pro in Training

yes something like that. i have not try it yet, but I am wonder how im going to set the sub menus and all that.

jbisono 51 Posting Pro in Training

Hi i have a table which i was using with a datagrid using hyperlink to maintain a simple menu to browse a internal site. but now i decided to create a horizontal menu with the Menu Component of asp.net, i know there is a different way how to do this, using sitemap for example. but i really want to keep my table providing all the path.

My table have the following columns
Menu
Id_Menu
Title
URL
Option_Fun

Which Option_Fun identify the parent for example
1, Google, www.google.com, General
2, Yahoo, www.yahoo.com, General

so in that case i know that under General i have 2 links. well my thing is can i generate a menu using as datasource my table?

Thanks any other suggestion i will appreciate.

jbisono 51 Posting Pro in Training

Good luck and welcome to this place.:)

jbisono 51 Posting Pro in Training

have you ever figure that out?

jbisono 51 Posting Pro in Training
<html>
<body>
<form action="mailto:your@mail.com" method="post" enctype="text/plain" >
FirstName:<input type="text" name="FirstName">
Email:<input type="text" name="Email">
<input type="submit" name="submit" value="Submit">
</form>  
</body>
</html>

maybe something like that can help you.

jbisono 51 Posting Pro in Training

Good excellent thanks.

jbisono 51 Posting Pro in Training

Hi, i once have that problem and i use this function and it work for me.

http://geekswithblogs.net/AngelEyes/archive/2007/04/12/111504.aspx