hericles 289 Master Poster Featured Poster

You have a couple of options to do this. Each step requires pulling the menu items out of the database of course but after that you can display the menu as a standard UL but with asp:Labels inside each <li> or use a literal control to output the html for the menu server side. The repeater is a better idea as it allows for differing amounts of menu items (to a degree) whereas the first method doesn't.

hericles 289 Master Poster Featured Poster

When you debug it what line is causing the null error? If is the line

strReturn = ConfigurationManager.ConnectionStrings("YourConnectionName").ConnectionString

the error will be because in the app.config the connection string is named "MyConnName" not "YourConnectionName".

hericles 289 Master Poster Featured Poster

You have 9 columns listed in the SQL statement but ten inputs in the values section including the zero at the end. The zero has no matching column specified.

hericles 289 Master Poster Featured Poster

I haven't done anything like this myself but I think you will need a service running in the background that checks the current open TCP connections against your blacklist and shuts them down if they feature on it. Of course TCP connections appear as IP addresses so your blacklist will either need to consist of IP addresses or you will need to match a domain name to an IP.

hericles 289 Master Poster Featured Poster

As I mentioned in my first post the line

If(Articulos.Visible == true) {

should work. You keep saying you can't do the versionyou posted in C# but you never mention what goes wrong when you try. A couple of us have now pointed out that using == instead of = when make the if statement work but you don't seem to have tried it. What exactly goes wrong when you make the changes we suggest?

hericles 289 Master Poster Featured Poster

If you are using the same code above for your C# sharp project you will need to use

If(form1.Visible == true)Then   -- note the double ==

as this is the correct C# form to test for equivalence. Single equal signs set a variable and can't be used to as you have here.

hericles 289 Master Poster Featured Poster

You aren't setting the connection property of the command object to be your connection object and so your command objec can't execute. If you handled the catch block with some sort of error message you would have been informed of this. Add

command.Connection = connection

just below where you declare the command object.

hericles 289 Master Poster Featured Poster

You can use FTP to download the files to work on them. Once you're finished FTP them back to the site. Any downtime to a particular page or the site in general should be pretty minimal.
As for the server and password the site administrator will need to give that to you.

hericles 289 Master Poster Featured Poster

Post up some code and we'll have a look. My initial thought is that your first selector in the external file has a mistake in it.

hericles 289 Master Poster Featured Poster

Set the autoPostBack for the semester drop down to true (I think it is already) and add the onSelectedIndexChanged event to your code behind. Now when the value in the semester drop down is changed that method will fire and you can make whatever changes you need to the housing drop down.

<asp:DropDownList ID="SemesterDDL" runat="server" DataSourceID="SemesterDS" DataTextField="Semester_Name" DataValueField="Semester_ID" AppendDataBoundItems="true" AutoPostBack="true" onSelectedIndexChanged="SemesterDDL_OnSelectedIndexChanged">

Then in your code behind define the SemesterDDL_OnSelectedIndexChanged method.

hericles 289 Master Poster Featured Poster

For a start you copied my line of code in and didn't change where I wrote 'table' for the table name. Putting the correct table name in there will help.
Secondly, you are calling a SELECT statement with ExecuteNonQuery(), it should be with ExecuteScalar() as ExecuteNonQuery returns the number of rows affected by the statement not the rows themselves.

hericles 289 Master Poster Featured Poster

If lblResult.Text is always zero then this code is not being hit:

if (TextBox1.Text == abc && TextBox10.Text ==fgh )
{
lblStatus.Text = "***Data Already exist***";
count = 1;
return;
}

as count is never being incremented. If equipment_name and vendor_name mark a unique item why don't you check for that in the database rather than pull out all of the info and cycle through it.

SELECT COUNT(product_name) FROM table WHERE equipment_name = something AND vendor_name = something;

If the product is in there the result will be 1 (or more). If zero then do your insert.

hericles 289 Master Poster Featured Poster

Have you closed all open connections when they are no longer needed? You could be hitting the connection pool limit and so the system is waiting for resources to be released. But, to be honest,you would probably be seeing connection timeouts as well as delays if that was the problem.

hericles 289 Master Poster Featured Poster

I.m guessing it is your INSERT code. INSERT INTO table * isn't valid. If you are inserting into all columns just use INSERT INTO table_name VALUES(...).
Also, remove your custom message and replace it with ex.Message to view the actual error text.

hericles 289 Master Poster Featured Poster

Sorry, you've confused me. Are you saying that if you don't use ExecuteNonQuery the data is inserted but when you do use it you have an error? When you say that the result is added successfully the code simply ran without errors or that you can actually see the data inserted in the database?
In your previous post you mentioned getting an error message, what error was it?

hericles 289 Master Poster Featured Poster

You can set up your 3 statements as you have done and then do this:

Dim transaction As OleDbTransaction = conn.BeginTransaction()
Try
   Dim orderComman As New OleDb.OleDbCommand(sqlInsertOrder, connectionDatabase)
   Dim productCommand As New OleDb.OleDbCommand(sqlInsertProduct, connectionDatabase)
   Dim orderProductCommand As New OleDb.OleDbCommand(sqlInsertOrderProduct,         connectionDatabase)
   conn.Open()
   orderComman.ExecuteNonQuery()
   productCommand.ExecuteNonQuery()
   orderProductCommand.ExecuteNonQuery()
   transaction.Commit()
  conn.Close()

Catch ex As Exception
   transaction.Rollback()
   conn.Close()

Now all 3 commands will execute but only if all 3 run correctly will your database be altered. If anything goes wrong the transaction is rolled back and the database isn't affected by any of the commands. But if you're unsure look online for more examples.

hericles 289 Master Poster Featured Poster

Different inserts of new data are handled as different SQL statements. Set the statement to be the first insert and run it, then repeat until all tables that need to be updated have been. Now to do this properly you will want to look into database transactions. You can open a transaction on a database before you start the inserts and then when you are finished (and everything went well) commit the transaction - the changes take place then. If a problem occurs at any point you make the transaction rollback and it is as if none of the database changes ever occurred.
Without using transactions you can get yourself into a trouble if one insert runs and then a problem occurs.

hericles 289 Master Poster Featured Poster

Adding to a database is similar to what you have above except you have an INSERT or UPDATE statement as your SQL statement. SO, create a database connection object with a valid connection string, create a command object passing in the parameters of your SQL statement and the connection. Then open the connection and call command.executeNonQuery() to add the data.

hericles 289 Master Poster Featured Poster

In that particular example they went to a lot of trouble to create an image map where they defined the regions each link would relate too. The page source makes a good example of how to do it yourself. Less accuracy in the borders would make the task a lot simplier.

hericles 289 Master Poster Featured Poster

When you run the project in debug mode (or normally if you have set exceptions) what error messages do you get (if any)? If you get an error it will tell you if it is caused by the connection to the database or something else.

hericles 289 Master Poster Featured Poster

In the page directives at the top of your .aspx page you need to register the user control.

<%@ Register TagName="whatever" TagPrefix="uc" Src="location_of_control_file" %>

then in the page, where you want it to be, you reference it with the tagPrefix and the name. So, in my example it would be:

<uc:whatever id="" runat="server" />
hericles 289 Master Poster Featured Poster

Yep, you use <style></style> for CSS you want to include in your header file. If you want to use an external stylesheet you use <link href="style_sheet_location" />

hericles 289 Master Poster Featured Poster

external style sheets serve the same purpose as external javascript files; it supports the removal of presentation from functionality, keeping html separate from your css and javascript.

hericles 289 Master Poster Featured Poster

Check the format of the date information coming out of the database. It can appear as YYYY:MM:DD (particulary if you used an SQLfunction to enter the date in the first place) so searching for 03.07.2012 won't find anything. That tripped me up once.

hericles 289 Master Poster Featured Poster

after the database insertion has completed the simplest thing you can do is this:

dropdownlist2.Items.Add(TextBox1.Text);

Or, better, code up another function that selects the employee ID out of the database and adds the resulting dataset to dropdownlist2. You need to do this anyway if you intend to populate the dropdown when the form loads.

hericles 289 Master Poster Featured Poster

OK, if you want the dropdownlist2 to show the newly entered data and everythign before it then then best thing to do is what I suggested above.
1) insert the employee ID into the database
2) on page_load (or call it directly after the insertion) draw the employee info from the database and populate the dropdownlist
2a) You could, instead of hitting the database each time the page reloads, fill the list the first time the page loads and everytime you save an employee ID just add it to the list with

dropdownlist2.Items.Add('the employee ID')

That will save a bit of server resources and data passing back and forth.

As for the insertion problem, tell us what it is and post up some code, we'll have a look.

hericles 289 Master Poster Featured Poster

Are you saying that after entering the data (employee ID) that it should be saved to the database and then the next time the app is started dropDownList2 is populated with the employee IDs? If so, then the dropDownList2 will need to draw the info out of the database and have the data added to it, presumably on page_load.
Are you having trouble with the data insertion or getting it back out?

hericles 289 Master Poster Featured Poster

Iwould suggest you check the SQL error logs. They will hopefully tell you what is going wrong with the server starting. If you post the error up here we can probably help fix it for you.

hericles 289 Master Poster Featured Poster

Ah, I see, I thought it was just a border mis-alignment going on there.
Try adding the z-index:100 value to the menu. That should layer it above the following content.

hericles 289 Master Poster Featured Poster

Sorry, where is the overlap? Everything looked OK in Firefox.

hericles 289 Master Poster Featured Poster

Maybe you should post up some code so we can see what you've done.
Although in your previous post you have

Dim frm As New frm2()

That should probably be

Dim frm As New Form()

I assumed that was a mistake but maybe it isn't.

hericles 289 Master Poster Featured Poster

You shouldn't need to create your own Show method. The correct method is Show() - uppercase but the IDE should have corrected that for you. Delete the show() method you created, change the code in form1 to Show() and it should work.

hericles 289 Master Poster Featured Poster

You are missing some syntax somewhere in the class, most likely a method that has no End Sub.

hericles 289 Master Poster Featured Poster

You can simply redirect to the MyAccount page and then it uses the session value to load the appropriate data. If you are going to another page in your own site passing a session variable as a parameter in the URL is really not needed.

hericles 289 Master Poster Featured Poster

You are calling your cmd.execute twice, once to execute it and again to ensure it worked and clear out the textboxes. That is where the duplication is coming from. Remove the first instance and the second will run and provide you with your check that it succeded at the same time.

hericles 289 Master Poster Featured Poster

LinkButton.Text = "Like";

You will want the code to check the current text of the button so it knows what to change to I guess. An if statement will do that easily enough:

if(LinkButton1.Text == "Like") {
    LinkButton1.Text = "Unlike";
    // plus whatever other codes runs when something is liked
} else {
    LinkButton1.Text = "Like";
}

Initially you will want to show two buttons (like and dislike) but once a selection is made you would be better to hide one of the buttons as only one is needed now - to reverse the decision. For example, if I like the page there is no point changing the like button to unlike because there will now be unlike and dislike which is pretty confusing to the user. Better to change its visibility instead and leave the dislike button unchanged.

mani508 commented: n!ce help +0
hericles 289 Master Poster Featured Poster

For HTML emails the images always need to be used with an absolute path. src="image1.jpg" means nothing when the code is away from your development environment. You will need to host the images on a server and point to them with a full address.
This link will help you: http://kb.mailchimp.com/article/top-html-email-coding-mistakes

hericles 289 Master Poster Featured Poster

The checked method returns a boolean, true if checked false if otherwise. So you can use

if (!checkBoxAddSub.Checked && !checkBoxMultDiv.Checked)

hericles 289 Master Poster Featured Poster

Download wordpress ;)
Or, if you want to do this yourself, what areas of web design are you familiar with? Are you asking for help with site design, databases or the actual coding?
Simply put you will have one page that allows you to enter your blogs (unless you intend to upload them some other way) and the page that shows the blog titles and dates and then extracts and displays the selected one.
If you need help with particular areas we can help more.

hericles 289 Master Poster Featured Poster

It looks like you are missing an operator (AND or OR) in your statement.

sql = "Select * From Skills Where StampNo = " & Stamno & " Cell = " & cell & " And Op-Number = '" & op & "' "

This translates to SELECT * FROM skills WHERE StampNo = someValue Cell = cellValue AND Op-Number = opValue.
So you can see you're missing an operator between somevalue and Cell.

hericles 289 Master Poster Featured Poster

The isNumeric function is probably the easiest solution. It returns a boolean value indicating whether the input can be parsed to a number.

hericles 289 Master Poster Featured Poster

Try this version. It looks like you have got your WHERE condition syntax incorrect

INSERT INTO jobs (priority, date, deadline, material, status) VALUES (?, ?,?,?,? ) WHERE customerID = (SELECT customerID from Customer where CustomerID =?)

hericles 289 Master Poster Featured Poster

it should be href not ref in your anchor tag.

seblake commented: Thank you!! for your speedy reply! Do appreciate the help! +1
hericles 289 Master Poster Featured Poster

is checking for the date modified or created of the file an option? At least using those dates the format is set and you're not relying on user input to determine if you want to operate on that file.

hericles 289 Master Poster Featured Poster

You will need to check that you are accessing the correct database, you are logging in as the right user or that the user you are logging in as has the correct permissions to interact with the database or table. You could also be missing the prefix name when it is required (normally DBO).

hericles 289 Master Poster Featured Poster

It looks like you just need to change the float of the menu as it is currently set to float: right;
I'd follow the advice at the top of the CSS file and add a new CSS file after this one that has the new CSS rules in it. That way it will overwrite the rules you need to but leave your original CSS untouched. By doing it this way you can also play around with the style as much as you like without doing any real damage.

hericles 289 Master Poster Featured Poster

I would change the database table to have the employee ID the date time stamp and a status showing whether they entered or exited (1 or 0 basically). Then you just insert into the table the employee ID, the time stamp and the status (based on whether the sign in or sign out button was clicked).
Otherwise, as you have it, when they sign out you need to locate the last row used by the employee (having a sign in time but no sign out) and update the sign out time. This is pretty awkward and inefficient.

in your code for the button you need the database connection and command execution code. If you don't know how to do this there are plenty of tutorials online that eplain it in better detail than you can get here.

hericles 289 Master Poster Featured Poster

It seems to me you have your logic round the wrong way. If the data reader can't read then there are no rows so the user name isn't entered. If the reader has rows then the name is taken and you inform the user of that.
You need to swap your code around in the if...else statements.

hericles 289 Master Poster Featured Poster

It looks to me like your SQL statement is wrong. Where you use a join the ON clause is meant to specify which columns match but you haven't done that. You have 'ON PateintTbl.SLP_ID = Session(logAccount)'

This should be: ON PateintTble.SLP_ID = SLP.someMatchingColumn WHERE SLP_ID = ' + Session(logAccount) + ';''

Including Session(logAccount) directly in the string is also incorrect as that would be taken exactly as is, and not evaluated to the value Session(logAccount) holds.

hericles 289 Master Poster Featured Poster

Use writeLine instead of write. That will add a line terminator to each line.