|
You need to describe it better than that i'm afraid.
the .ToString()??? the function??? the routine??? try to convert your byte array to a string before hand. It's fairly easy.
All you need to do is iterate through the array collection and convert each byte to a char before adding it to a string.
Cheers
Shawty
|
|
|
|
|
Sir,
please explain it in detail
|
|
|
|
|
There's not much to it.
You just need to declare a string, make it empty :
String [myvariablename] = ""
then you just need to loop over your byte array :
foreach(byte [mybytevariablename] in [mybytearrayname])
then in the loop just concatenate each element.
[myvariablename] = [myvariablename] + [mybytevariablename]
When your finished, then the string you defind should be a string of all the chars in your byte array which you can then pass to the function.
replace the [..] above as appropriate for your variable names where you've defined them.
|
|
|
|
|
If you can write encryption code, I fail to understand why you have a problem with such trivial error. At least you tell me what your code is trying to do, and why you are impementing it this way.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Hi,
Good Day!!!
I did a asp.net website application in one system. When I place the same application in other system, I could not able to open it.
Can anyone please suggest me that what are the minimum requirements to be done to open the application in other system?
Thanks,
Ravi Chandra.
|
|
|
|
|
nuthan anand wrote: I did a asp.net website application in one system. When I place the same application in other system, I could not able to open it.
What does it mean? VS is there ? Did you copied complete Web sites and Solution file?
nuthan anand wrote: Can anyone please suggest me that what are the minimum requirements to be done to open the application in other system?
Open VS -> File -> Open -> Web sites.
Browse the folder , and open it.
That's all.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
I think the most common thing is this. Someone creates a website within visual studio and so the security on the directory is handled for you. Then you move the directory to someother location for deployment and it doesn't work. Typically this is because the service that is running doesn't have proper access to the new directory. However, it would be more helpful if you shut of friendly error messages and posted what the exact error is that your getting.
|
|
|
|
|
HI all,
I gave the stored procedure for a sql adapter(database1) and in the select command i selecedt stored procedure ..
I have other adapter(database2) in tat i gave the update stored procedure for same table.
can i do the code like this
sqladapter1.fill(ds)
take that dataset and update to other sqladapter 2
sqladpater2.update(ds)
wether it will work?
or any other idea or easy way to insert a table datas from one db to other db table ..
pls help me
|
|
|
|
|
try googling:
1.) T-SQL Append from
2) .NET SQlCommand
should answer all your questions in the 1st page of each search
|
|
|
|
|
Specifically:
Windows Server 2008 Datacenter 64-bit
Oracle 10.2 instant client x86 64-bit
IIS 7
.NET 3.5 / ASP application
The behavior is that the app pool sometimes crashes when I hit the website, or sometimes it gives a database connection ASP error page. I can get it working by stopping the site, then renaming the directory and binding the site to the renamed directory. I startup the site and it works! But when I reboot the machine it doesn’t work, so it seems like there’s something intermittent with the database drivers.
Any suggestions?
|
|
|
|
|
Khaldris wrote: he behavior is that the app pool sometimes crashes when I hit the website
How did you say that? Is there other application also added to the same application pool ?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
I'm not at the deployment site at the moment, or I would be able to tell you. I'm currently installing IIS to my machine locally in order to test it here.
|
|
|
|
|
|
Hi Guys...
I am using "CalendarExtender" on a TextBox in ASP.NET...
when run the WebSIte...this "CalendarExtender" is hidden by other controls of web pages..
So I can see only few parts of this "CalendarExtender" control...
<cc1:CalendarExtender ID="txtDate_CalendarExtender" runat="server"
Animated="true" EnabledOnClient="true"
Enabled="True" TargetControlID="txtDate" PopupPosition="Right">
</cc1:CalendarExtender>
Please Help me out...
Thanks
|
|
|
|
|
Just place Extender and any server control in same DIV
|
|
|
|
|
Could you please provide me sample code?
|
|
|
|
|
you didn't post any code to comment on.
suspect
<blockquote class="FQ"><div class="FQA">Sr...Frank wrote:</div><cc1:CalendarExtender ID="txtDate_CalendarExtender" runat="server"
Animated="true" EnabledOnClient="true"
Enabled="True" TargetControlID="txtDate" PopupPosition="Right">
</cc1:CalendarExtender></blockquote>
<div>
TextBox declare here Id must = txtDate
<cc1:CalendarExtender ID="txtDate_CalendarExtender" runat="server"
Animated="true" EnabledOnClient="true"
Enabled="True" TargetControlID="txtDate" PopupPosition="Right">
</cc1:CalendarExtender>
</div>
OT :preview stoped working
modified on Thursday, March 12, 2009 4:24 PM
|
|
|
|
|
|
Bibhash Mishra wrote: i have already googling to find the source but not able to find any suitable RSS
why do you need RSS for this? you can do it your self. start with your location (where your server is located) and then calculate the time difference for every city you want to show.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Yes, i would agree with that.
In fact this is a perfect thing to use the new dynamic list & linq features for.
Somthing like :
public class timeEntry
{
Public String name = "";
Public DateTime time = DateTime.now();
}
then make a list of timeEntrys
List<timeentry> myList = new List<timeentry>()
{
new timeEntry(){ name = "London", time = DateTime.Parse("1/1/1 00:00:00") },
new timeEntry(){ name = "Paris", time = DateTime.Parse("1/1/1 01:00:00") },
... and so on ...
};
You can then assign it to a datagrid or anything else in code by using the following :
var timeList = from p in myList
select p;
gridView1.DataSOurce = timeList;
gridView1.DataBind();
As your making the list by hand, you can apply what ever maths you want to apply in the relevent areas of the constructor.
|
|
|
|
|
Hello Yusuf,
Thanks for the reply but i have a problem i can't use server location for showing time, it vary.i have already shown weather and news reading with Rss
modified on Friday, March 13, 2009 2:03 AM
|
|
|
|
|
I am using active directory
in web config when i put identify tag impersonate=false
the code works fine and everyone can log in but when i change impersonate=true then the users are not able to login.
i need impersonate=true for my zip code to work
please let me know if there is any settings to be done
|
|
|
|
|
Is this an intranet application? If not do your users have AD accounts setup?
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Yes this intranet application
It works fine when impersonate = false
but when i change it to impersonate = true
the users are not able to login
|
|
|
|
|
Hai all,
I am having a DataGrid, paging is true,at a time displaying 10 records.If i am exporting this datagrid data to excel,it is inserting all the records in the datagrid.Instead of that i want to insert only 10 recods.Code is below.I think the prob is with foreach loop in this code,how i should replace that
public void ExportDataToExcel(DataTable datatable, string[] Headers, string SourcePath, string DestinationPath)
{
int i, j;
string strSourceTemplate = "";
string strDestFileName = "";
string strHeaders = "";
string strRow = "";
System.Data.OleDb.OleDbConnection objXlsCon = null;
System.Data.OleDb.OleDbCommand objCmd;
try
{
objXlsCon = new System.Data.OleDb.OleDbConnection();
if (datatable.Rows.Count > 0)
{
strSourceTemplate = SourcePath;
strDestFileName = DestinationPath;
System.IO.File.Copy(strSourceTemplate, strDestFileName);
objXlsCon.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strDestFileName + ";Extended Properties=\"Excel 8.0;HDR=Yes;MAXSCANROWS=1;\";";
objXlsCon.Open();
objCmd = new System.Data.OleDb.OleDbCommand();
objCmd.Connection = objXlsCon;
for (i = 0; i < Headers.Length; i++)
{
strHeaders += Headers[i].ToString() + ",";
}
string s=datatable.Columns[0].ColumnName;
int k=0;
foreach (DataRow drow in datatable.Rows) {
for (j = 0; j < datatable.Columns.Count; j++)
{
if(Headers.Length > k)
{
if(datatable.Columns[j].ColumnName == Headers[k].ToString())
{
if(drow[j].ToString() != "" )
{
strRow += drow[j].ToString() + "','";
}
else
{
strRow +="-'"+",'";
}
k++;
}
}
}
objCmd.CommandText = "Insert into [Sheet1$] (" + strHeaders.Substring(0, strHeaders.Length - 1) + ") values ('" + strRow.Substring(0, strRow.Length - 3) + "')";
objCmd.ExecuteNonQuery();
strRow = "";
j = 0;
k=0;
}
}
}
catch (Exception ex)
{
throw ex;
}
finally
{
objCmd = null;
objXlsCon.Close();
}
}
|
|
|
|