.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Convert php to aspx...

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :Windows Application


I got this:

	<?php $count = 0; foreach ($_POST as $name => $value) { ?>
	<tr class="<?php echo $count % 2 == 0 ? 'alt' : '; ?>">
		<td><?php echo $name ?></td>
		<td><?php echo nl2br(htmlentities(stripslashes($value))) ?></td>
	<?php } ?>


that recive data from:


<form id="form1"  method="post" action="file.php">


How to convert it?


View Complete Post

More Related Resource Links

How to convert from HTML in aspx form?


This code works only in HTML format. This means that I can not select standard components:
"Inserting an ASP.NET control will convert the HTML form in the page to an ASP.NET form and remove its current properties. Do you want to insert the ASP.NET control?"

When converted following code does not work anymore.
I'd like that code works in ASP.NET mode.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_scripts_Default" %>

<!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">

<script src="jquery-1.2.6-vsdoc.js" type="text/javascript"></script>
<script src="jquery-1.2.6.js" type="text/javascript"></script>
<script src="JScript.js" type="text/javascript"></script>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <meta name="robots" con

Convert English to Arabic number without changing any regional settings in .net

Well, most applications that I worked with was multilingual that supports English UI and Arabic UI.

And one of the major issue that we have faced is displaying Arabic numbers without the need of changing the regional settings of the PC.

So the code below will help you to display Arabic number without changing any regional settings.

Code works on aspx but not ascx


Not sure which category to put this question in, so I will put it in here.

Just to give you an idea of the layout of my solution, I have the main project, along with 2 class libraries, BLL and DAL.  (Business Logic Layer and Data Access Layer)

The BLL refers to the DAL and the main project refers to the BLL.

I had a test website and the code worked fine, but the same code will not work on the real project. The only difference is that in the test project, the code was on an aspx code behind, whereas in the real project, it is an ascx code behind (Web User Control )

The code is:

Dim connectionString As String = ConfigurationManager.ConnectionStrings("ASPNETDBConnectionString").ConnectionString
        Dim recordEntry As New UserRecord(connectionString)
        recordEntry.UserName = "TestName"
        recordEntry.BMI = bMI
        recordEntry.BMR = bMR
        recordEntry.FTM = fTM
        recordEntry.TDEE = tDEE
        recordEntry.TodayDate = dateForToday

Dim connectionString As String = ConfigurationManager.ConnectionStrings("ASPNETDBConnectionString").ConnectionString

Create an API (aspx vs mvc)


Hi everybody!

I'm not sure if this is the right place to ask this, so, sorry if it's not. I have to create a web application. I can handle that. But, it has a requirement I've never done before. I need to create an API for that application, so other apps can get or set information from/to my webapp.

I've been searching a lot and still don't have a starting point. Seems that MVC is really good to do that, but I'm not familiar with MVC, so I would need a starting point. I was thinking to do it in aspx (Framework 4), but do not know how to do that with aspx either.

Can anyone help me to get started with this?

Thanks in advance

Launch CMD File From ASPX Page


My organization uses a CMD file to install updated files for a major enterprise application. Currently, we send out an email to users with a link to the file and instructions to run it, BUT inevitably users don't update their machines until their in field and try to start the app.


We're now liking the idea of using an ASPX page to prompt the users to run the updates and to capture the fact that the updates have been run. I realize that we can't capture the success or failure of the update. But we'd like to capture the user accessed the page.


Is it possible to embed into the markup for the page a link to the file on the local intranet that the users can click on to run the file?

The user accessing the page would capture that they did just that. We'd deal with wether or not the update was actually installed or if it failed later with them directly.

Custom views on .aspx webpage


Hi again, i have a client that needs me to create a custom view on thier webpage similar to Microsoft Word.

It goes about that, when I click on an image it redirects me to another page and must create a custom view for a certain paragraph on that page. I am not sure how to do this and wonder if anyone knows how.

I am using C# programming language if that helps at all. I Heard that using javascript would work but i dont know javascript yet so is there any alternative?

Visual Studio closes itself by opening aspx-Page designer after Windows Update


Hey Guys,

I've a problem with my Visual Studio.

On the 13th of August 2010 i installed a Windows update on my vista sp2 pc. For this date my Visual Studio 2008 sp 1 always has closed itself by opening an aspx-page in designer view. There is no error message just closing the window. I restored a backup of my windows from the time before updating it and it helped, i could open aspx pages in the design view till the update has been installed again automatically after rebooting the pc. I can't disable windows updates, cause it's my pc at work and safety is very important. I hope you could help me out of this disaster.



is it possible to convert whole visual studio 2008 web site project to visual studio 2010 web site p


is it possible to convert whole visual studio 2008 web site project to visual studio 2010 web site project


my current project references




i have a very annoying iis problem

iis server stops working until app pool is recycled


i am hoping that new visual studio (net framework 4.0) may solve this very annoying unsolveable problem


Convert excel file into xml


Hai, I have two columns with id,name in the excel sheet.I want to convert into xml file in the below format

<?xml version="1.0" encoding="utf-8"?>

<guide xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Boat id="1"> <name> Copper Kettle </name> </Boat> <Boat id="2"> <name> Copper Penny </name> </Boat> <Boat id="3"> <name> Copperhead </name> </Boat> <Boat id="4"> <name> Coppertone </name> </Boat> <Boat id="5"> <name> Copy Boy </name> </Boat> </guide>

suggest me with sample code in ASP.NET. Thanks


convert SQL data to EDI 835 file


I was assigned to create a app to convert SQL data to EDI 835 file. (Electronic Data Interchange file for Health Care Claim Payment/Advice,  outbound process only).

Can someone help me where to start?

Composite Control which contains arbitrary content defined in .aspx of parent and thier ViewState


I want to write own control which can contain other. And I want to define content of the control in the .aspx file where the control is defined. I have written such control. But now I have issue with ViewState of inner controls of my control. The following samle illustrates the issue: I defined two asp:DropDownList ID="ddl1" and ID="ddl2" One of them is inside of my control and other is outside. When posback is occurred asp:DropDownList ID="ddl1 loses state and becomes empty. How to say ASP.net to store state of inner controls defined by this way?


<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MyControl.ascx.cs" Inherits="DynamicControls.Controls.MyControl" %>

<div class="box">
    <div class="Header-Left">
        <div class="Header-Right">
            My Control
    <div class="Content">
        <asp:PlaceHolder ID="contentPlace" runat="Server" />

Convert WCF service to self hosting application


 I created project as a  WCF Service application and now according to recuriment that needs to be converted as a self hosting application

How can i do this?

Converting WCF service app to Self hosting app?

How to Convert HTML to Image


 HI all,

I was struggling for the process/code to convert html to image. Please suggest any tutorials for this. And also any code help greatly appreciated.


thanks and regards,



convert jpeg to tiff


Hi all,

I need to comvert jpeg to tiff using c#.net

I have achieved this but problem is image size is increasing drastically. eg: 25 kb of jpeg image is converted to 650 kb of tiff image.

What should be done to have the same image size as of original or atleast double the image size as of original.

Please suggest me. Thanks in advance.

Crystal Report vs 2003 convert to vs 2008 parameter problem


Hi friend,

I have a project develop with Visual Studio 2003, when i convert the project to Visual Studio 2005 is work well. But when i convert to Visual Studio 2008, the crystal report when have pass parameter will prompt the parameter field to re-type then show the report.

But in this converted project i create a new report and pass the parameter is ok. That means i wan re-do all report @.@??

Does someone can help me solve this problem??

Thank you

Convert Cold Fusion to VB.Net


Could someone please help me convert the following code to VB.Net?  

<cfif isdefined("form. backgroundCheckResult")> 


                <cfif processingStatus eq "success">

                                <cfoutput>success </cfoutput>





Migrating ASP to ASPX.... where to set 301 redirects


Hello, I'm updating around 15 pages from .asp to .aspx (.net 2.0)

My question is, do I have to put a header redirect 301 (permanent redirect) on each old file, or can I put it in global.asax file with a case checking for any of the 15 files?

I some tries to go to old.asp will it execute global.asax anyway?

What would the best aproach be?



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend