|
pamsmech wrote: Can i use ASP.NET With PHP.
Does this question makes any senses ? What do you mean by that ? What you are trying to do ?
Please be specific while asking some question .
cheers,
Abhijit
CodeProject.Com MVP
|
|
|
|
|
pamsmech wrote: Forum: ASP.NET
Subject: ASP.NET with PHP [modified]
Sender: pamsmech
Date: Thursday, January 8, 2009 2:13 PM
I have an application in ASP.NET and I have some design pages in PHP.
Can i include all those PHP deign files in ASP.NET Application.
This time you have Explained your problem details and its quite understandable. Try This[^]
cheers,
Abhijit
CodeProject.Com MVP
|
|
|
|
|
While Saving How we can convert the selected .bmp and jpeg or anyother image into .gif Image.
How we can resize the image Eg. Reduce the Height and Width.
|
|
|
|
|
hi,
U can use instance of Bitmap class like this
Bitmap b = new Bitmap(...)
ans use public Save method to save image with format ImageFormat.Gif
and if u want to resize image , try this code , hope it help
public Size CalculateDimensions(Size oldSize, int targetSize)
{
Size newSize = new Size();
if (oldSize.Height > oldSize.Width)
{
newSize.Width = (int)(oldSize.Width * ((float)targetSize / (float)oldSize.Height));
newSize.Height = targetSize;
}
else
{
newSize.Width = targetSize;
newSize.Height = (int)(oldSize.Height * ((float)targetSize / (float)oldSize.Width));
}
return newSize;
}
the oldSize param is old size of your image
the targetSize param is new dimension you want to resize to.
|
|
|
|
|
Hi,
As i have downloaded a small asp.net ajax project and i added this project to my visual studio 2005 and when i execute the project the error message "object reference not set to an instance of an object". and also i modified the connection string. The ASPNET.MDF file in server explorer is having the cross mark. can anyone provide solution for this.
Thank in advance..
|
|
|
|
|
Debug the code.And check the line of code from that you are getting this error and it would be helpful if you put your piece of code here.
Cheers!!
Brij
|
|
|
|
|
Hi Samiullah,
this has nothing to do with the connection string. The program is missing an object, where an object is expected it is null. Check the exception details for the line in the code where the exception is thrown. This will give you a hint which object is missing.
Regards
Sebastian
|
|
|
|
|
The error as follow...
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 720: private void InitConnection() {
Line 721: this._connection = new global::System.Data.SqlClient.SqlConnection();
Line 722: this._connection.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["AdventureWorksConnectionString"].ConnectionString;
Line 723: }
Line 724:
Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\products\7bb3ee42\1a34f12b\App_Code.3orrxfoa.2.cs Line: 722
|
|
|
|
|
Check the connection string. Enter valid credentials, and database name.
Cheers,
Sudhanva
|
|
|
|
|
Good afternoon everyone ,
I have created a class library in C#.NET.
That contains one class MyClass.
i want to create instance of this class inside javascript.
Can anybody tell me what are the necessary steps and precautions i have to take !!
MyClass.cs
public class MyClass
{
string m_filePath ;
MyClass()
{
this.m_filePath =String.Empty;
}
MyClass(string _filePath)
{
this.m_filePath =_filePath;
}
}
and the instance should call parameterised ctor.
var obj = new MyClass("c:\\"); -> what should be JS code.
Thanks in Advance........
DaTtA
way2datta@gmail.com
|
|
|
|
|
Dattatraya Kale wrote: and the instance should call parameterised ctor.
var obj = new MyClass("c:\\"); -> what should be JS code.
Why you are trying this ?
If you want to pass client side variable to C# class, use HiddenField, Store values in hidden field and access from C# class from code behind .
cheers,
Abhijit
CodeProject.Com MVP
|
|
|
|
|
Thanks a lot for yr reply
but i do want to call that dll from client side
and not from server side.
|
|
|
|
|
Dattatraya Kale wrote:
but i do want to call that dll from client side
Then you can use ActiveXObject .
cheers,
Abhijit
CodeProject.Com MVP
|
|
|
|
|
Thanks once again .
yup i tried that approach but i am missing something related with dll.
When i try to create instance it is giving javascript error
"Automation server can't create object."
Please give me Steps to create dll.
and sample code ..
Thanks in advance !!
DaTtA
way2datta@gmail.com
|
|
|
|
|
|
Hai,
I have a user control in my master page,which shows the company logo based on the language selected from the dropdown in the content page,the logo comes dynamically from different language folders,I update a session variable when I change the language in the dropdown,but when I update the language the user control is not getting refreshed,only reloading the page changes the logo.
cheers,
Thomas.
|
|
|
|
|
Hi Thomas,
Add following code where you update the Session variable.
Response.Redirect(Request.Url.ToString());
Thanks,
Padmanabh Ganorkar
|
|
|
|
|
Hai,
if (ddl_language.SelectedItem.Value.ToString() != "0")
{
HttpCookie cookie = new HttpCookie("viterion_app_language");
cookie.Value = ddl_language.SelectedItem.Text.ToString();
cookie.Expires = System.DateTime.Now.AddDays(365);
Response.Cookies.Add(cookie);
}
From this cookie, the session varible is updated in the master page through the init event.
The code is
HttpContext.Current.Session.Add("app_language", HttpContext.Current.Request.Cookies["viterion_app_language"].Value);
cheers,
Thomas.
|
|
|
|
|
what your code ?
|
|
|
|
|
Hi,
I want to hide the toolbar and menu bar address bar, when my webpage is loaded.that is immediately after the URL is requested.I am using ASP.NET(C#). And also need to block the F5 KEY coz its a shortcut for refresh.
reply ASAP.
THANKS IN ADVANCE
zari
|
|
|
|
|
why u wana do this . u can simply search from google
|
|
|
|
|
I used this script,
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top=0,left=0,scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open('Login.aspx',myname,settings);}
and called the function in onload of tag..... but it keeps on loading again n again
zari
|
|
|
|
|
Hi,
I am using WebBrowser Control and passing the url at run time.
I want to insert some text or javascript into the body of the web page being loaded in the browser.
I tried like below.
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
WebBrowser browse = (WebBrowser)sender;
if (!(webBrowser1.Document.Body.InnerHtml.Contains("Hello")))
{
webBrowser1.Document.Body.InnerHtml = browse.Document.Body.InnerHtml + "<script type='text/javascript'> var Hello; var i; var totalTable = document.getElementsByTagName('table').length; for(i=0;i < totalTable; i++) { document.getElementsByTagName('table')[i].id = 'name' + i; } function myfun() { this.style.border = 'solid 5px Red'; } function myfun1() { this.style.border = 'none'; } for(i=0;i < totalTable; i++) { document.getElementsByTagName('table')[i].onmouseover = myfun; document.getElementsByTagName('table')[i].onmouseout = myfun1; } </script>";
}
}
But, This is not working. This event is fired many times for single page.
Thanks,
Nagaraj
|
|
|
|
|
Hi all,
I have a dataview which contains song titles retrived frm the database and when user click on the play button on each row corresponding song should play.
How can i do the same
Thanks in advance
|
|
|
|
|
u simplay drag drop the sound file and declare them in program.
|
|
|
|