|
Hi Jaymm,
Setting the Width and Height in Pixels make the page dependent on resolution. If you will set the Width and Height in 100% it will not be dependent on resolution and What ever resolution you will set the page will fit on to that resolution only. Set as below
Width="100%", Height="100%"
Hope this help.
Thanks,
Mohit Jain
MCTS, MCSD.Net, MCPD.Net
|
|
|
|
|
|
hai all,
i am using the below function for password encryption.here my password is changing into encrypted form,but i dont know how to check that encrypted form password with plain text password from database?
because database contains plain text password.Please can anybody respond my question.
i wanted to use md5 in my login page.
I dont know exactly how to use it.
Public Function MD5Encryption(ByVal passwd As String) As Byte
Dim i As Integer
Dim md5 As MD5CryptoServiceProvider = New MD5CryptoServiceProvider
Dim hashedbytes As Byte()
Dim textencoder As UTF8Encoding = New UTF8Encoding
hashedbytes = md5.ComputeHash(textencoder.GetBytes(passwd))
md5.ComputeHash(textencoder.GetBytes(passwd))
Dim right As StringBuilder = New StringBuilder
For i = 0 To hashedbytes.Length - 1 Step 1
right.Append(hashedbytes(i).ToString("x2"))
Next i
If (right.ToString() <> passwd) Then
Response.Redirect("login.aspx")
md5.Clear()
Else
Response.Redirect("index.html")
End If
End Function
kissy
|
|
|
|
|
|
thanks for ur reply.exactly u r correct.If stored the password in encrypted form in the database can anybody know whats the password is?
if some use asking his forgotten password,then how can i tell immediately if i look at the databse.
For security purpose i wanted to encrypt,but the concept of storing encrypted password in the databse may lead to some other problem?
Pleas understand my question and answer me.
Thans once again
kissy
|
|
|
|
|
Kissy16 wrote: .If stored the password in encrypted form in the database can anybody know whats the password is?
You have some major issues.
1 - MD5 is a hash, NOT an encryption. Therefore, you have to apply MD5 to your entered password and see if the hashes match.
2 - MD5 is not very secure at all. It's better than plaintext, but not much good against a serious attacker. Your best bet is to add some salt, and hope they can't work out what that is
Kissy16 wrote: but the concept of storing encrypted password in the databse may lead to some other problem?
The concept of storing your non encrypted password leads to the problem you're trying to avoid. No two ways about it. Try thinking this through, just a little.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
How important is it that these passwords remain protected?
Just remember that if somebody has access to your passwords within your database then they probably have access to all your other data too which makes it kinda pointless encrypting all your passwords.
|
|
|
|
|
thanks once again
yes u r correct,
1)but the use may change his password in later.At that time is that sqlserver automatically convert the changed password into encrypt form.
2)No this time how do i know what user has changed?
This is my question,i have no idea please guide me through ur knowedge.
So please tell me the answer
kissy
|
|
|
|
|
hi..i m facing most of the same problem as u. my problem is that, i've taken any random number and encrypt it through md5 and store it in the database.. but while changing password, when i want to check that random number with that encrypted password(i've encrypted the random number) then the encryption of the random number is not same as that one which is stored in database. while checking, i m giving the random number through text box. i think(with my a bit knowledge), encryption of value of a variable will not be same as encryption of the same value entered by the textbox. it can be some database problem also....i dont know.... i m sure that my coding is correct
|
|
|
|
|
Hi,
I have written a linq query and bind it to a gridview. Now i want to implement sorting on gridview columns for which i want this linq query to store in dataview.
So how it is possible to store linq query in dataview.
the following is the code which i have written to bind gridview.
protected void BindGrid()
{
try
{
var employees = from e in DetailContext.Employees orderby
e.Emp_Code descending
select new {e.Emp_Id,e.Emp_Code,e.F_Name,e.L_Name,e.Designation };
GridView1.DataSource = employees;
GridView1.DataBind();
}
catch (Exception ex)
{
throw ex;
}
}
Pranav Dave
|
|
|
|
|
There is one .cs for converting linq to datatable
//.cs file
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.Data;
public class LinqToDataTable
{
public static DataTable ObtainDataTableFromIEnumerable(System.Collections.IEnumerable ien)
{
DataTable dt = new DataTable();
try
{
foreach (object obj in ien)
{
Type t = obj.GetType();
PropertyInfo[] pis = t.GetProperties();
if (dt.Columns.Count == 0)
{
foreach (PropertyInfo pi in pis)
{
if (pi.PropertyType.Name == "Nullable`1")
{
string str = pi.PropertyType.FullName;
str = str.Replace("System.Nullable`1", "");
str = str.Substring(str.IndexOf("System"));
str = str.Substring(0, str.IndexOf(","));
dt.Columns.Add(pi.Name, str.GetType());
}
else
dt.Columns.Add(pi.Name, pi.PropertyType);
}
}
DataRow dr = dt.NewRow();
foreach (PropertyInfo pi in pis)
{
object value = pi.GetValue(obj, null);
dr[pi.Name] = value;
}
dt.Rows.Add(dr);
}
}
catch (Exception)
{
dt = null;
}
return dt;
}
}
//DataTable dtEmployees = LinqToDataTable.ObtainDataTableFromIEnumerable((IEnumerable)employees);
now assign the datatable in dataview
Padmanabhan
|
|
|
|
|
Is there a way to convert an System.Drawing.Image to an System.Web.UI.WebControls.Image?
Im getting the image from database, the binary being in base 64 string. I then convert it back to an array of bytes. My problem is that I can't find a way to create the System.Web.UI.WebControls.Image with a Stream or an array of bytes... I got the Image from Drawing but I can't convert it back to a WebControl Image.
I suppose I must write down the file somewhere on the server then return the path but I dont want to leave these temporary images on the drive.
Any ideas or suggestion anyone?
Thanks & Regards,
Anil Chelasani
|
|
|
|
|
anil.chelasani wrote: Is there a way to convert an System.Drawing.Image to an System.Web.UI.WebControls.Image?
No. The namespace is the clue. One is an image, and one is a control that shows an image. You need to write a page that returns the stream of bytes, and point an Image control to it.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Thanks for reply.
but the problem is i am converting aspx page to pdf by using third party DLL. Here when i give an aspx URL it will execute that and create a PDF file, but it is not executing the link which is given to ImageURL of the image which resides on the aspx page. Please help me.
Thanks & Regards,
Anil Chelasani
|
|
|
|
|
Your page should just contain the image, if you've done it right. No third party tool should change that, unless it flat out does not support images.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
I have a page (supplier.aspx) which will dispaly the anual report of the suppplier on which i have to show the Logo of that supplier. Logo is in Database so first i have to get that to a page(Logo.aspx) i am doing so it is working properly on the aspx by writing the following line of code in the supplier.aspx.cs.
image.ImageURL="Logo.aspx?supid=4";
Upto supplier.aspx page it is ok it is displaying the logo but when i conert supplier.aspx page to PDF using
pdfConverter.SavePdfFromHtmlStringToFile(pdfData, "a.pdf");
here "pdfData" is html rendered code of the supplier.aspx page. Here is our problem when it converts into PDf it is not displaying the image because it can't execute the path which we had given to ImageURL. It is executing the physical path on the disk and getting the image to pdf from disk but it is not working with aspx page link. So i just want to put directly the image on to the supplier.aspx page without calling Logo.aspx page.
Thanks & Regards,
Anil Chelasani
modified on Friday, May 29, 2009 3:15 AM
|
|
|
|
|
Hi,
I am new to asp.net, i would like to know whether there is any free online website testing tools available, i tried to find in google but could not get it?
plz help.
|
|
|
|
|
Subin Alex wrote: am new to asp.net
How new is new ? What other programming have you done ?
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
If you just want XHTML validation then check here:validate[^]
|
|
|
|
|
If you can't answer us, you want free tools, and you have no idea how to program, then I suggest you change careers, perhaps something in foodservice.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
I am using LINQ to SQL classes in my application.I have added one table on to the O/R Designer from server explorer and saved DataClassses.dbml.
Now, if i open DataCalsses.designer.cs file, there should be a Partial Public Class DataClassesDataContext. This file also should contains an entity class for the table.
But i am getting an empty page without any code.
what would be the problem?
Can anybody please help me?
Thanks in advance.
sudha
|
|
|
|
|
hello my friends. here is my questions
1)
i have made an application with a database.
i have made a win application with a database included. i wite the code using datasets,datatables etc... if i want to see the new datas in a table i have to reload the MyDatabase.mdf file in order to see them if i save datas when i run the application, so if i make a setup.exe for this app when i run it and do some sabes in the database will iu be able to see them in the app??
2)
i created an setup.exe
but when i fire tha icon to run it it says something about the database
"An attempt to attach an auto-named database for file C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\WebSites\WebSite1\App_Data\aspnetdb.mdf failed. A database with the same name exists, or specified file cannot be Opened, or it is located on UNC share."
any suggestions???
thank you
|
|
|
|
|
1 - your mdf is your DB. I don't believe you can use it without SQL Server installed. Once it's there tho, it will work, obviously
2 - Looks like you created an installer with your aspnetdb database. You shouldn't need to do that.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
yes but i have tpo make it setup exe for end users,
about the setup and this error message what shoud i do
|
|
|
|
|