bharanidharanit -4 Junior Poster

Hi,
I am using this SP, am getting both the result when using mysql workbench.

CREATE PROCEDURE SP(IN _start INT,IN _end INT,INOUT _count INT)
BEGIN

   SET _count = (SELECT COUNT(*) FROM tbl);

   SET @qry = CONCAT('select * from tbl limit ', _start, ',', _end);

   PREPARE stmt FROM @qry;
   EXECUTE stmt;
   DEALLOCATE PREPARE stmt;

END

But when using with PDO am returning this error

$c=0; 
$stmt = $this->_dbc->getConnection()->prepare("CALL SP(0,10,:count)"); 
    $stmt->bindParam(":count",$c,PDO::PARAM_INT|PDO::PARAM_INPUT_OUTPUT,0); 
    $stmt->execute(); 
    return $c; 
PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1414 OUT or INOUT argument 3 for routine db22.SP is not a variable or NEW pseudo-variable in BEFORE trigger 

But on changing

$this->_dbc->getConnection()->prepare("CALL SP(0,10,[B]:count[/B])");

to

$this->_dbc->getConnection()->prepare("CALL SP(0,10,@count)");

am not returning any error, but always getting the count as 0.

1.Whats the difference between :count and @count ?
2.How to get exact count via pdo ?

bharanidharanit -4 Junior Poster

hi,
I hav a created a field with unique constraint, so if it got duplicated error must be returned from procedure. Wats wrong here?

$dbconn = new DbConn;
		$dbc = $dbconn->Fn_CreateDbConn();
		$Qry = $dbc->prepare("CALL CMS_School_Insert(:SchoolID,:SchoolName)");	
		$Qry -> bindParam(":SchoolID",$SchoolID);
		$Qry -> bindParam(":SchoolName",$SchoolName);
                try
                {
		    $Qry -> execute();
                 }catch(PDOException $e)
                  {
                      return "Error: ".$e->getMessage();
                  }

Here s my procedure

DELIMITER //

CREATE DEFINER=`root`@`localhost` PROCEDURE `CMS_School_Insert`(_SchoolID INT, _SchoolName VARCHAR(100))
BEGIN
    IF (SELECT COUNT(*) FROM CMT_School WHERE School_ID=_SchoolID) = 0 THEN
        INSERT INTO CMT_School (School_Name) VALUES (_SchoolName);
    ELSE
        UPDATE CMT_School SET School_Name=_SchoolName WHERE School_ID=_SchoolID;
    END IF;
END//
bharanidharanit -4 Junior Poster

Hi,
I would like to develop ecommerce site using fuzzy logic. Any ideas? Where to start with? got confused in writing rules for it and implementing the filtering concept based on the user visit.

bharanidharanit -4 Junior Poster

hi,
Is there any good CMS for ASP.NET like drupal, joomla ?

bharanidharanit -4 Junior Poster

Hey guys! Just wanna ask some question on how to put a embers log-in or a registration area for viewers?

Hi,
You must use database for this like MySQL, MS SQL, Oracle etc. and also some server-side-scripting languages like PHP, ASP.NET, JSP etc.
If you have programming knowledge, i suggest you to use ASP.NET because the framework have inbuilt controls for login and user registration.
Post Back if you have issues.

bharanidharanit -4 Junior Poster


Don't think; check it (with the validator at http://validator.w3.org)/

There are still 2 errors (no DOCTYPE and no TITLE).

Ya thankyou, and i know that. Actually i simply posted here for another question and while uploading my page i wil look for the errors and fix it out.

bharanidharanit -4 Junior Poster

I think i have fixed the error now.

<html>
<head>
<style type="text/css">
#div1
{
	float: left;
	overflow: auto;
	width: 7.5em;
	height: 7em;
	background-color: red;
	vertical-align: top;
}
#subdiv1,#subdiv2,#subdiv3,#subdiv4
{
	float:left;
	background-color: green;
	width: 50px;
	height: 75px;
}
</style>

</head>
<body>
<table border="1" cellpadding="0" cellspacing="0">
<tr>
	<td id="div1">
		<table border="1" cellpadding="0" cellspacing="5">
			<tr>
				<td><div id="subdiv1">1</div></td>
				<td><div id="subdiv2">2</div></td>
				<td><div id="subdiv3">3</div></td>
				<td><div id="subdiv4">4</div></td>
			</tr>
		</table>
	</td>
</tr>
</table>
</body>
</html>
bharanidharanit -4 Junior Poster

hi, thanks this works for me. But i

need some changes here. I set the overflow to be hidden. Then i place 2 buttons, when i press the rightbutton the 3&4 div must be show and when leftbutton 1&2 button to be shown. Is that possible?

<html>
<body>
<head>
<style type="text/css">
#div1
{
	float: left;
	overflow: auto;
	width: 7.5em;
	height: 7em;
	background-color: red;
	vertical-align: top;
}
#subdiv1,#subdiv2,#subdiv3,#subdiv4
{
	float:left;
	background-color: green;
	width: 50px;
	height: 75px;
}
</style>

</head>
<body>
<table border="1" cellpadding="0" cellspacing="0">
<tr>
	<td id="div1">
		<table border="1" cellpadding="0" cellspacing="5">
			<tr>
				<td><div id="subdiv1">1</div></td>
				<td><div id="subdiv2">2</div></td>
				<td><div id="subdiv3">3</div></td>
				<td><div id="subdiv4">4</div></td>
			</tr>
		</table>
	</td>
</tr>
</table>
</body>
</html>
bharanidharanit -4 Junior Poster

Hello,
I am storing avatar images in a table dynamically.
I want to store only 2 avatars in a row, but there may exists any no of avatars. Also in the view i want only to show 3 rows. The remaining must be hidden. When i click some button i want the other 3 rows to be showed and so on.
Is that really possible? Thankyou

bharanidharanit -4 Junior Poster

Hi try this,

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<title></title>
		<style type="text/css">

html,body {
	margin: 0;
	padding: 0;
}

body {
	background: #CCC;
	font-family: 'Arial', sans-serif;
	font-size: 9pt;
	width: 100%;
	
}
#content{
	height: 500px;
}
#hovermenu *  { padding:0px; margin: 0px; font: 1em arial; }

#hovermenu {  
	position: absolute; 
	z-index: 99; 
	margin: -5px auto; 
	float: left; 
	line-height: 20px; 
	text-align:  center;
	}

#hovermenu a { 
	display: block; 
 	background: #005277; 
 	text-decoration: none; 
 	padding: 0px;
 	padding-top: 5px;
 	color: #CCCCCC;
 }
#hovermenu a:hover { 
	font-weight: bold;
	font-size: 14px;
	}


#hovermenu ul li, #hovermenu ul li ul li  { 
	width: 100px; 
	list-style-type:none; 
	}

#hovermenu ul li {
	 float: left; 
	 width: 100px;
	 }

#hovermenu ul li ul, #hovermenu:hover ul li ul, #hovermenu:hover ul li:hover ul li ul{ 
	display:none;
	list-style-type:none; 
	width: 100px;
	}

#hovermenu:hover ul, #hovermenu:hover ul li:hover ul, #hovermenu:hover ul li:hover ul li:hover ul { 
	display:block; 
	}

#hovermenu:hover ul li:hover ul li:hover ul { 
	position: absolute;
	margin-left: 120px;
	margin-top: -20px;
	}

#document {
	overflow: hidden;
	position: relative;
	width: 100%;
}

#header {
	background: #005277;
	height: 75px;
}

#header h1 {
	line-height: 60px;
	margin: 0;
	padding: 0;
}

		</style>
	</head>
	<body>
		<div id="document">
		<div id="header">
		<h1 id="colorwhite">SNW</h1>
			<div id="hovermenu">
				<ul>
					<li><a href="">Menu1</a>
						<ul>
							<li><a href="">Submenu1</a></li>
							<li><a href="">Submenu2</a></li>
						</ul>
					</li>
					<li><a href="">Menu2</a>
						<ul>
							<li><a href="">Submenu1</a></li>
							<li><a href="">Submenu2</a></li>
						</ul>
					</li>
					<li><a href="">Menu3</a></li>
					<li><a href="">Menu4</a></li>
					<li><a href="">Menu5</a></li>
				</ul>
			</div>
			</div>
			<div id="content">
				
			</div>
			<p id="footer">
			
			</p>
		</div>
	</body>
</html>
bharanidharanit -4 Junior Poster

Hi,
Try this, u placed an misplaced else.

<?php
include_once("gatewayapi/inc_gatewayapi.php");
$transaction = new GatewayTransaction($_REQUEST, $_SERVER['REMOTE_ADDR']);
if($transaction->ProcessTransaction($responseString, $errorCode))
{
	$response = new GatewayResponse($responseString, $GatewaySettings['delim_char']);
	if($GatewaySettings['MD5Hash']&& !$response->VerifyMD5Hash($GatewaySettings['MD5Hash'],$transaction->username,$transaction->amount))
	{
		header("Location: " . $GatewaySettings['PaymentDeniedPage'] . "?gateway_error=" . rawurlencode($transaction->GetErrorString("INVALID_MD5HASH")));
		exit();
	}
	if($response->IsApproved()) 
	{
		$eol = "\r\n";
		$to = "donation@myclient.org"; //the recipient
		$subject = "Donation Information"; // the subject
		$message = "";
	?>	
		<html>
			<head>
				<title>Donation Information</title>
			</head>
		<body>
			<p>Donation Information</p>
				<table>
						<tr>
							<th>Donation Amount:</th>
						</tr>
						<tr>
							<td><?php echo($_GET['amount']); ?></td>
						</tr>
						<tr>
							<th>Designation:</th>
						</tr>
						<tr>
							<td><?php echo $_GET["Desc"]; ?></td>
						</tr>
				</table>
	<p>Billing Information</p>
	<table>
		<tr>
			<th>First Name:</th>
			<th>Last Name:</th>
		</tr>
		<tr>
			<td><?php echo $_GET["first_name"]; ?></td>
			<td><?php echo $_GET["last_name"]; ?></td>
		</tr>
		<tr>
		<th>Spouse Name:</th>
		</tr>
		<tr>	
			<td><?php echo $_GET["Spouse"]; ?></td>
		</tr>
		<tr>
			<th>Address:</th>
		</tr>
		<tr>
			<td><?php echo $_GET["address"]; ?></td>
		</tr>
		<tr>
			<th>City:</th>
		</tr>
		<tr>
			<td><?php echo $_GET["city"]; ?></td>
		</tr>
		<tr>
			<th>State:</th>
		</tr>
		<tr>
			<td><?php echo $_GET["state"]; ?></td>
		</tr>	
		<tr>
			<th>Zip Code:</th>
		</tr>
		<tr>		
			<td><?php echo $_GET["zip"]; ?></td>
		</tr>
		<tr>
			<th>Country:</th>
		</tr>
		<tr>
			<td><?php echo $_GET["country"]; ?></td>
		</tr>
		<tr>
			<th>Phone Number:</th>
		</tr>
		<tr>
			<td><?php echo $_GET["phone"]; ?></td>
		</tr>
		<tr>
			<th>Email Address:</th>		
		</tr>
		<tr>
			<td><?php echo $_GET["email"]; ?></td>
		</tr>
		<tr>
			<th>Credit Card:</th>
		</tr>
		<tr>
			<td><?php echo $cc_number = "XXXX-XXXX-XXXX-" . substr($cc_number,-4,4); ?></td>
		</tr>
	</table>
	<p>Shipping Information</p>
	<table>
		<tr>
			<th>First Name:</th>
			<th>Last Name:</th>
		</tr>
		<tr>
			<td><?php echo $_GET["shipping_first_name"]; ?></td>
			<td><?php echo $_GET["shipping_last_name"]; ?></td>
		</tr>
		<tr>
			<th>Address:</th>
		</tr>
		<tr>
			<td><?php echo $_GET["shipping_address"]; ?></td>
		</tr>
		<tr>
			<th>City:</th>
		</tr>
		<tr>
			<td><?php echo $_GET["shipping_city"]; ?></td>
		</tr>
		<tr>
			<th>State:</th>
		</tr>
		<tr>
			<td><?php echo $_GET["shipping_state"]; ?></td>
		</tr>
		<tr>
			<th>Zip Code:</th>
		</tr>
		<tr>
			<td><?php echo $_GET["shipping_zip"]; …
bharanidharanit -4 Junior Poster

Hi,
I changed your coding something like this. It is now easy to verify. Dont mingle html in echo. Also when you are getting anything from session means, you have start the session at the top of the page, in both the page, where you are setting sessions and in retrieving that sessions.

<?php
	session_start();
if (!isset($_SESSION['valid_recipe_user']))
{
	?>
	<h2>Sorry, you do not have permission to post recipes</h2>
	<a href="index.php?content=login.inc.php">Please login to post recipes</a>
	<?PHP
}
else
{
	$userid = $_SESSION['valid_recipe_user'];
	?>
	<form enctype="multipart/form-data" action="index.php" method="post">
	<h2>Enter your new recipe</h2><br>
	<h3>Title:</h3><input type="text" size="40" name="title"><br>
	<h3>Short Description:</h3><textarea rows="5" cols="50" name="shortdesc"></textarea>
	<h3>Ingredients (one item per line)</h3>
	<textarea rows="10" cols="50" name="ingredients"></textarea><br>
	<h3>Directions</h3>
	<textarea rows="10" cols="50" name="directions"></textarea><br>
	<h3>Calories</h3>
	<input type="text" size="10" name="calories"><br>
	<input type="hidden" name="MAX_FILE_SIZE" value="100000" /><br>
	If you took a picture upload it here: <input name="picture" type="file" /><br>
	<p></p>
	<input type="submit" value="Submit">
	<input type="hidden" name="poster" value="<?PHP echo($userid); ?>"><br>
	<input type="hidden" name="content" value="addrecipe">
	</form>
<?PHP
}
?>
bharanidharanit -4 Junior Poster

I used recaptcha, i added to my, i am having already javascript validation, i also want this to be validated. I dont know how to proceed from this step. Now i am able to see captcha in my page. But i dont know how to display error message. When the user register, he must be checked with every fields that he has return correctly and also checks with captcha, then the page must redirect to the next page. Here is my coding,

<html>
 <head>
 <title>Register Page</title>
 <script type="text/javascript" language="javascript">
 function validate_register()
 {
     alert('hi');
     var usrname = document.getElementById('regusrname').value;
     var usrpwd = document.getElementById('regusrpwd').value;
     var cusrpwd = document.getElementById('regcusrpwd').value;
     if (usrname=="")
     {
         document.getElementById('v1').innerHTML = "Enter Username";
         return false;
     }
     elseif (usrpwd=="")
     {
         document.getElementById('v2').innerHTML = "Enter Password";
         return false;
     }
     elseif (usrpwd != cusrpwd)
     {
         document.getElementById('v3').innerHTML = "Password Missmatch";
         return false;   
     }   
     else
     {
     return true;
     }
 }
 </script>
</head>
 <body>
 <table width="100%" border="1">
 <form method="POST"   action="chkregister.php">
 <tr>
 <td>Enter Username:</td>
 <td><input type="text" id="regusrname" name="regusrname" /></td>
 <td id="v1">&nbsp;</td>
 </tr>
 <tr>
 <td>Enter Password:</td>
 <td><input type="text" id="regusrpwd" name="regusrpwd" /></td>
 <td id="v2">&nbsp;</td>
 </tr>
 <tr>
 <td>Confirm Password:</td>
 <td><input type="text" id="regcusrpwd" /></td>
 <td id="v3">&nbsp;</td>
 </tr>
 <tr>
 <td>Enter Email Address:</td>
 <td><input type="text" id="email" name="email" /></td>
 <td id="v4">&nbsp;</td>
 </tr>
 <tr>
 <td>Enter Captcha Verification</td>
 <td>
 <?php
  
 require_once('recaptchalib.php');
  
 // Get a key from http://recaptcha.net/api/getkey
 $publickey = "6LePbAoAAAAAALvKwRXXsD8fhSCCqR_yKTHq4wfQ";
 $privatekey = "6LePbAoAAAAAAGG3kNPiaSUfiHx0mexGYwOueBrt";
  
// the response from reCAPTCHA
 $resp = null;
 //the error code from reCAPTCHA, if any
 $error = null;
  
 //was there a reCAPTCHA response?
 if ($_POST["recaptcha_response_field"]) {
         $resp = recaptcha_check_answer ($privatekey,
                                         $_SERVER["REMOTE_ADDR"],
                                         $_POST["recaptcha_challenge_field"],
                                         $_POST["recaptcha_response_field"]); …
bharanidharanit -4 Junior Poster

Hi now this time its not at all outputting the values from the session. Here's my code.

<?PHP
echo ("Hello");
$code1 = $_SESSION['code'];
$code = $_SESSION['6_letters_code'];

echo ($code1);
echo ($code);
?>
bharanidharanit -4 Junior Poster

ok i will try...

bharanidharanit -4 Junior Poster

Ya for eg: when the page loads at first, the image shows jkls45 and the $_SESSION shows something different, When i again load the page, the shows some other captcha and now the SESSION shows the previous captcha jkls45

bharanidharanit -4 Junior Poster

Hello Thankyou,
i am already having that code in line 72. But when i takes session variables. the image displaying the different code and $_SESSION showing the different one. And how can i compare those two?

bharanidharanit -4 Junior Poster

Hello,
Is this possible to set gradient and lightening effect in backgrounds colors with css?

bharanidharanit -4 Junior Poster

I would like to add captcha to my registration system. I searched google and i get some. There are more number of scripts in that which are little bit complex to go on. I simply took my needs from that. Now My registration page is generating captcha, but i dont know how to check it back after the user enters from the shown image.
Here's my coding.
Captcha.php

<?php 
session_start();
//Settings: You can customize the captcha here
$image_width = 120;
$image_height = 40;
$characters_on_image = 6;
$font = './monofont.ttf';

//The characters that can be used in the CAPTCHA code.
//avoid confusing characters (l 1 and i for example)
$possible_letters = '23456789bcdfghjkmnpqrstvwxyz';
$random_dots = 0;
$random_lines = 20;
$captcha_text_color="0x142864";
$captcha_noice_color = "0x142864";

$code = '';


$i = 0;
while ($i < $characters_on_image) { 
$code .= substr($possible_letters, mt_rand(0, strlen($possible_letters)-1), 1);
$i++;
}


$font_size = $image_height * 0.75;
$image = @imagecreate($image_width, $image_height);


/* setting the background, text and noise colours here */
$background_color = imagecolorallocate($image, 255, 255, 255);

$arr_text_color = hexrgb($captcha_text_color);
$text_color = imagecolorallocate($image, $arr_text_color['red'], 
		$arr_text_color['green'], $arr_text_color['blue']);

$arr_noice_color = hexrgb($captcha_noice_color);
$image_noise_color = imagecolorallocate($image, $arr_noice_color['red'], 
		$arr_noice_color['green'], $arr_noice_color['blue']);


/* generating the dots randomly in background */
for( $i=0; $i<$random_dots; $i++ ) {
imagefilledellipse($image, mt_rand(0,$image_width),
 mt_rand(0,$image_height), 2, 3, $image_noise_color);
}


/* generating lines randomly in background of image */
for( $i=0; $i<$random_lines; $i++ ) {
imageline($image, mt_rand(0,$image_width), mt_rand(0,$image_height),
 mt_rand(0,$image_width), mt_rand(0,$image_height), $image_noise_color);
}


/* create a text box and add 6 letters code in it */
$textbox = imagettfbbox($font_size, 0, $font, $code); 
$x = ($image_width - …
bharanidharanit -4 Junior Poster

Hello,
I am using GridViewand bounding values from 2 tables. tbl_login and tbl_register.
In tbl_register Table the Field is UserName
In tbl_login Table the Field is Active(yes/no field)
I used this command to show the fields into the gridview.

SELECT tbl_createuser.UserName, tbl_createuser.Role, tbl_login.Active FROM (tbl_createuser INNER JOIN tbl_login ON tbl_createuser.UserID = tbl_login.UserID1) ORDER BY tbl_createuser.RegistrationDate DESC

Initially when the user register, his account is inactive. The admin only wants to make the account active.
After showing the fields in gridview, how to make it editable, initially all the Active Field is unchecked, so when the admin checks it, it must be updated to the database?
Any ideas regarding this?
Thankyou...

bharanidharanit -4 Junior Poster

I am designing the application like that in the link. And i want to design database for that.

bharanidharanit -4 Junior Poster

Hello,
I am designing School Management System. I dont know how to design database for this.
My Application contains 5 parts.
Student
Teacher
Parent
Data Entry
Admin
I need to maintain the following records. And these are not fields and i need all these for the particular page.
Register (UserName,Password,SecurityQuestion,SecurityAnswer ,Email,Role)
Login (UserName,Password,Active,LoginAttempts,LastLoginD ate, etc.)
Profile (UserName,Password,FirstName,LastName,DOB,FatherNa me,Role,Class,Address,Area,City,State,Country,Phon e,Email etc.)
Attendance(Present or Absent,Date,Holiday(yes or no))
Also i need to maintain timetable, holidays, working days, report cards, user management etc.

Pls have a look at this link. I am creating the duplicate of this one. And how to design database for the needs in that application?
http://demo.calorisplanitia.com/esm/default.aspx

bharanidharanit -4 Junior Poster

I am on my own like to create a vocal remover software. So where i need to start with?

bharanidharanit -4 Junior Poster

Hello,
I want to use CreateUserWizard.
Here i want to add some additional fields in that wizard.
Also i want my own validation (even for password format) in this wizard.
Also i want this to be stored in my sql database, instead of ASP.NET Website Configuration default website (as it is very larger of around 10 mb).
How can i do this?
So when i use login control validation must occurs from this database.

bharanidharanit -4 Junior Poster

Hello sir,
I am creating student attendance tracking system in asp.net.
With attendance i need to track students attendance every day and want to generate charts with those data.
Charts for Daily Attendance report, Weekly Report, and monthly Report.
For this how to design database in msaccess?

You could do this with three tables!

1. Student Table
2. Calendar Table
3. Attendance Table


Insert all student records in the student table.
Insert all working days and holidays in the calendar.
With the third table you have a choice.
You can choose to insert both present & absent students.
You could choose to insert only the absent students (assuming that everyone else who doesn't have a record was present for that day).

The structure of the table would be:
Studentid,
Date,
Status (Status "P" for present "a" for absent).

Student Table
StudentID
StudentName

Calender Table
Working Date
Holiday

Attendance Table
StudentID
CalendarID
Attendance

bharanidharanit -4 Junior Poster

Hi
It's as simple as that. take a look at the eg:

<asp:Menu ID="Menu1" runat="server" BackColor="#E3EAEB" DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#666666" StaticSubMenuIndent="10px">
                        <StaticSelectedStyle BackColor="#1C5E55" />
                        <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
                        <DynamicHoverStyle BackColor="#666666" ForeColor="White" />
                        <DynamicMenuStyle BackColor="#E3EAEB" />
                        <DynamicItemTemplate>
                            <%# Eval("Text") %>
                        </DynamicItemTemplate>
                        <DynamicSelectedStyle BackColor="#1C5E55" />
                        <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
                        <StaticHoverStyle BackColor="#666666" ForeColor="White" />
                        <Items>
                            <asp:MenuItem Selectable="False" Text="Select" Value="Select"></asp:MenuItem>
                            <asp:MenuItem Text="Product" Value="Items">
                                <asp:MenuItem NavigateUrl="~/Product/Product.aspx" Text="Item Card" Value="Item Card">
                                </asp:MenuItem>
                                <asp:MenuItem NavigateUrl="~/GridViewTest.aspx" Text="GridViewTest" Value="GridViewTest">
                                </asp:MenuItem>
                                
                                <asp:MenuItem NavigateUrl="~/Product/frmRptProduct.aspx" >
                                </asp:MenuItem>
                                
                            </asp:MenuItem>
                            <asp:MenuItem Text="Sales" Value="Sales"></asp:MenuItem>
                            <asp:MenuItem Text="Purchase" Value="Purchase"></asp:MenuItem>
                            <asp:MenuItem Text="Test" Value="Purchase" NavigateUrl="~/ConfimButtonExtenderEg.aspx"></asp:MenuItem>
                            <asp:MenuItem Text="Reports" Value="Reports" NavigateUrl="~/Product/frmRptContainer.aspx" ></asp:MenuItem>
                            <asp:MenuItem Text="DAAB3.1Test" Value="DAAB3.1Test" NavigateUrl="~/Test_DAAB3.aspx" ></asp:MenuItem>
                            <asp:MenuItem Text="Create User" Value="DAAB3.1Test" NavigateUrl="~/createUser.aspx" ></asp:MenuItem>
                            
                        </Items>
                    </asp:Menu>

Mark as solved if it helps you!!!

Thankyou, the code is working.

bharanidharanit -4 Junior Poster

Thanks that is working. And i alread found other one.
http://www.carlosag.net/Tools/CodeTranslator/

bharanidharanit -4 Junior Poster

Encrypting and Decrypting Text, Saving and retrieving it from Database, Full Working Coding

Imports System.Security.Cryptography
Imports System.IO
Imports System.Data.OleDb
Partial Class _Default
    Inherits System.Web.UI.Page
    Private conn_str As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\db_encrypt_decrypt.mdb;Persist Security Info=False"
    Private DataConn As New OleDbConnection(conn_str)
    Private Sub cmdEncrypt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdEncrypt.Click
        ' Encrypt
        Dim MyText As String
        MyText = Encrypt(TextBox1.Text, "bharani1") ' Here aabc123a is the key and textbox1.text is the text which you want to encrypt
        Label1.Text = MyText
        Dim cmd As New OleDbCommand("insert into tbl_encrypt_decrypt(Pwd) values (?)", DataConn)
        cmd.CommandType = Data.CommandType.Text
        cmd.Parameters.AddWithValue("Pwd", Encrypt(TextBox1.Text, "bharani1"))

        DataConn.Open()
        cmd.ExecuteNonQuery()
        DataConn.Close()
        Response.Write("Success")
    End Sub

    Private Function Encrypt(ByVal strText As String, ByVal strEncrKey As String) As String
        Dim IV() As Byte = {&H12, &H34, &H56, &H78, &H90, &HAB, &HCD, &HEF}
        Try
            Dim bykey() As Byte = System.Text.Encoding.UTF8.GetBytes(strEncrKey)
            Dim InputByteArray() As Byte = System.Text.Encoding.UTF8.GetBytes(strText)
            Dim des As New DESCryptoServiceProvider
            Dim ms As New MemoryStream
            Dim cs As New CryptoStream(ms, des.CreateEncryptor(bykey, IV), CryptoStreamMode.Write)
            cs.Write(InputByteArray, 0, InputByteArray.Length)
            cs.FlushFinalBlock()
            Return Convert.ToBase64String(ms.ToArray())
        Catch ex As Exception
            Return ex.Message
        End Try
    End Function

    Private Sub cmdDecrypt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdDecrypt.Click
        DataConn.Open()
        Dim cmd As New OleDbCommand("select Pwd from tbl_encrypt_decrypt where ID =7", DataConn)
        cmd.ExecuteNonQuery()
        Dim dr As OleDbDataReader
        dr = cmd.ExecuteReader
        While dr.Read()
            Label1.Text = Decrypt(dr("Pwd"), "bharani1").ToString()

        End While
            DataConn.Close()
    End Sub

    Private Function Decrypt(ByVal strText As String, ByVal sDecrKey As String) As String
        Dim IV() As Byte = {&H12, &H34, &H56, &H78, &H90, &HAB, &HCD, &HEF}
        Dim inputByteArray(strText.Length) As Byte
        Try
            Dim byKey() As …
bharanidharanit -4 Junior Poster

Hi used the below coding for enrypting and decrypting a text. But with this i dont know how to save to a database, when i tried i am getting many errors. How to do this?

Private Sub cmdEncrypt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        ' Encrypt
        MyText = Encrypt(textbox1.text, "aabc123a") ' Here aabc123a is the key and textbox1.text is the text which you want to encrypt
    End Sub

Private Function Encrypt(ByVal strText As String, ByVal strEncrKey As String) As String
        Dim IV() As Byte = {&H12, &H34, &H56, &H78, &H90, &HAB, &HCD, &HEF}
        Try
            Dim bykey() As Byte = System.Text.Encoding.UTF8.GetBytes(strEncrKey)
            Dim InputByteArray() As Byte = System.Text.Encoding.UTF8.GetBytes(strText)
            Dim des As New DESCryptoServiceProvider
            Dim ms As New MemoryStream
            Dim cs As New CryptoStream(ms, des.CreateEncryptor(bykey, IV), CryptoStreamMode.Write)
            cs.Write(InputByteArray, 0, InputByteArray.Length)
            cs.FlushFinalBlock()
            Return Convert.ToBase64String(ms.ToArray())
        Catch ex As Exception
            Return ex.Message
        End Try
    End Function

Private Sub cmdDecrypt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        MyText = Decrypt(TextBox2.Text, "aabc123a")
End Sub

Private Function Decrypt(ByVal strText As String, ByVal sDecrKey As String) As String
        Dim IV() As Byte = {&H12, &H34, &H56, &H78, &H90, &HAB, &HCD, &HEF}
        Dim inputByteArray(strText.Length) As Byte
        Try
            Dim byKey() As Byte = System.Text.Encoding.UTF8.GetBytes(sDecrKey)
            Dim des As New DESCryptoServiceProvider
            inputByteArray = Convert.FromBase64String(strText)
            Dim ms As New MemoryStream
            Dim cs As New CryptoStream(ms, des.CreateDecryptor(byKey, IV), CryptoStreamMode.Write)
            cs.Write(inputByteArray, 0, inputByteArray.Length)
            cs.FlushFinalBlock()
            Dim encoding As System.Text.Encoding = System.Text.Encoding.UTF8
            Return encoding.GetString(ms.ToArray())
        Catch ex As Exception
            Return ex.Message
        End Try
    End Function

Remember to add top of import: Imports System.Security.Cryptography
bharanidharanit -4 Junior Poster
Protected Sub imgUpload_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles imgUpload.Load
        Dim cmd As New OleDbCommand("select ImageData from ImageTable where ImageName='menu.JPG'", DataConn)
        DataConn.Open()
        Dim dr As OleDbDataReader
        cmd.ExecuteNonQuery()
        dr = cmd.ExecuteReader
        dr.Read()
        Response.BinaryWrite(dr("ImageData"))
        dr.Close()
    End Sub

I used the above and the image in displayed in imagebox, but in the page i am getting the as string as below.

bharanidharanit -4 Junior Poster

Hello sir,
how to change this coding to vb.net coding?

Stream photoStream = PhotoUpload.PostedFile.InputStream;
    int photoLength = PhotoUpload.PostedFile.ContentLength;
    string photoMime = PhotoUpload.PostedFile.ContentType;
    string photoName = Path.GetFileName(PhotoUpload.PostedFile.FileName);
    byte[] photoData = new byte[photoLength];
    photoStream.Read(photoData, 0, photoLength);
bharanidharanit -4 Junior Poster

Hello sir,
I am creating student attendance tracking system in asp.net.
With attendance i need to track students attendance every day and want to generate charts with those data.
Charts for Daily Attendance report, Weekly Report, and monthly Report.
For this how to design database in msaccess?

bharanidharanit -4 Junior Poster

Handle SelectedIndexChanged event and set AutoPostBack=true for DropDownList1.

Thankyou the issue was solved

bharanidharanit -4 Junior Poster

ASP.NET table or HTML table?

this is for HTML table

<asp:HyperLink ID="HyperLink1" runat="server" onmouseover="document.getElementById('tbl').visible=true" >HyperLink</asp:HyperLink>

You need to give ID for your table


Ya this works, But this is my coding

<script type="text/javascript" language="javascript" >
   function ShowHideMenu()
   {
    document.getElementById("mnuAttendance").style.visibility = "visible"
   }
   
   </script>
<tr>
                                                <td class="style18">
                                                    <asp:Image ID="Image3" runat="server" ImageUrl="~/Images/attendance.gif" />
                                                </td>
                                                <td class="style19">
                                                    <asp:HyperLink ID="HyperLink3" runat="server" >Attendance</asp:HyperLink>
                                                    <div id="mnuAttendance" style="visibility:hidden" >
                                                    <asp:HyperLink ID="HyperLink24" runat="server">HyperLink</asp:HyperLink>
                                                    </div>
                                                </td>
                                            </tr>

I used this coding, but i am getting the extra space below Attendance even after i hidden it. I want only on mouse over it must be visible.

bharanidharanit -4 Junior Poster

Thankyou the issue was solved

bharanidharanit -4 Junior Poster

Hello sir,
In a label i am having data like this 12/9/2009.
With split function i splitted numbers as 12, 9 , 2009. I want this numbers to be stored in LabelArray as Integers
Label1 = 12
Label2 = 9
Label3 = 2009
So i used this coding, but with this i am getting only 2009 in all the 3 labels.

Dim LabelArray(3) As Label
        LabelArray(0) = Label1
        LabelArray(1) = Label2
        LabelArray(2) = Label3
        Dim strData As String = Label15.Text
        ' Dim separator As Char[] {"/"}
        Dim words As String() = strData.Split(New Char() {"/"})
        Dim word As Integer
        For i = 0 To 2
            For Each word In words
                LabelArray(i).Text = word
            Next
        Next
bharanidharanit -4 Junior Poster

Hello sir,
In Datalist, the datas are bounded from Accessdatasource.
Accessdatasource contains StudentName field only.
I create itemtemplate field with checkbox.
Now When i click a button, the StudentName must be written for the checked one's from the checkboxes?
Thankyou

bharanidharanit -4 Junior Poster

Hello sir,
I am using 2 dropdownlist on my page.
Those 2 are bounded to AccessDataSource.
Initially dropdownlist2 is hidden.
Wen i select some values on dropdownlist1, the other must be visible.
Thankyou

bharanidharanit -4 Junior Poster

Hello,
How to remove vocals from an mp3 song?

bharanidharanit -4 Junior Poster

Hello,
I used the below coding to store an image into the database.

lblImagePath.Text = ImageUpload.PostedFile.FileName
        ImageUpload.PostedFile.SaveAs(lblImagePath.Text)
        Dim mbytes() As Byte = System.IO.File.ReadAllBytes(lblImagePath.Text)
        Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\database\db.mdb;Persist Security Info=False")
        Dim cmd As New OleDbCommand("insert into ImageTable values (@Image)", cn)
        cmd.Parameters.Add("@Image", OleDbType.Binary, mbytes.Length).Value = mbytes
        cn.Open()
        cmd.ExecuteNonQuery()
        Response.Write("Image load Success")
        cn.Close()

Now how to load this image into an image box?

bharanidharanit -4 Junior Poster

Hello,
How to show a table on mouse over an hyperlink in asp.net?
Initially while page loads the table must be hidden, and when on mouse over it must be seen?

bharanidharanit -4 Junior Poster

Hello,
The code which you given is only working in Internet Explorer and not working in other browsers such as firefox, opera, chrome....

bharanidharanit -4 Junior Poster

ya thanks I used this code.
select * from login where UserName = ' " & txtusername.text & " ' and password = ' " & txtpassword.text & " '
Thankyou

bharanidharanit -4 Junior Poster

Hello,
How to get the full path from fileupload control browsing the path to it?
I want to get as this.
c:\Images\mine.jpg

bharanidharanit -4 Junior Poster

Hello,
How to create hover menu. I want to create exactly as attached in the picture. When i mouse over the attendance, the menu should be displayed as such in the picture.
Anyone help in this?
Thankyou.

bharanidharanit -4 Junior Poster

You may use session to check your user id

Public Function CheckValidation(ByVal UserId As String) As Boolean
        CheckValidation= False
        If UserId = "" Then            
            Exit Function
        End If
        CheckValidation= True
    End Function

 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If  CheckValidation(Session("UserID")) = False Then
            Response.Redirect("../../Others/Sorry.aspx")
            Exit Sub
        End If           
    End Sub

Hello,
I am not using any user controls such as login control. I simply made a login with simple codings. By comparing the textbox values with database the user will log in. Now how the UserID will work. How to do this?

bharanidharanit -4 Junior Poster

Hello,
I am using Visual web developer 2008.
I am using AccessDataSource and i connected access database with that.
Now on my login page, i am having 2 text boxes (UserName and Password) and a login button.
So when i click login button, those 2 fields must be checked with database and if the information is correct it must login.
Thankyou

bharanidharanit -4 Junior Poster

Hello
I am having 3 files.
a file contains text as aaaa,bbbb,cccc
b file contains text as 1111,2222,3333
so i want to read these 2 files and write to new file as aaaa1111,bbbb2222,cccc3333.
Can i able to do this?

bharanidharanit -4 Junior Poster

Hello,
I need string Reversing in C
Read the output of a file as

ABCDEFGHIFSFSA
1242487132
FSFSA
*
Print the output as

*
FSFSA
1242487132
ABCDEFGHIFSFSA

bharanidharanit -4 Junior Poster

Hello,
I want to read a text file in C and the output file must be created and want to reverse the data in tat output file created.
So i used the below coding but not reversing the data in the output
file created.
eg: input file contains this data
abc
123
output file must be
123
abc

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define MAX_STRING_LENGTH 1000
#define BUFFER_SIZE 50

/* Global variables */
FILE *pInFile = NULL;                   /* File pointer to input file     */
FILE *pOutFile = NULL;                  /* File pointer  to output file   */
char *infilename = "C:\\myfile.txt";    /* Name of the file to be read    */
char *outfilename = "C:\\outfile.txt";  /* Name of the file to be written */
char *buffer = NULL;
size_t buffer_size = BUFFER_SIZE;


void main()
{
  size_t str_length = 0;
  int str_count = 0;
  fpos_t *positions = NULL;
  int i = 0;

  buffer = (char*)malloc(buffer_size);            /* Create initial buffer */

  if((pInFile = fopen(infilename, "r")) == NULL)  /* Open the input file   */
  {
    printf("Error opening %s for reading. Program terminated.", infilename);
    abort();
  }

  /* Find out how many strings there are */
  for(;;)
  {
    fread(&str_length, sizeof(size_t), 1, pInFile);  /* Read the string length */
    if(feof(pInFile))                                /* If it is end of file   */
      break;                                         /* We are finished        */

    /* Check buffer is large enough and increase if necessary */
    if(str_length>buffer_size)
    {
      buffer_size = str_length+1;
      free(buffer);
      buffer = (char*)malloc(buffer_size);
    }
    fread(buffer, str_length, 1, …