|
It works fine, thanks for your reply..
sebastian
|
|
|
|
|
Hello Everybody,
I m encrypting and decrypting the string.
When ever an string is encrypted and that encrypted value contains an '+' sign in it the it creates the following error(when it is online otherwise on local it is working fine )
Invalid length for a Base-64 char array.
it shows erroe in following line while decrypting :
byte[] toEncryptArray = Convert.FromBase64String(cipherString);
I am not able to understand why it is happing.
Regards,
rahul saini
|
|
|
|
|
Base64 is not encryption, it's merely encoding.
monuSaini wrote: (when it is online otherwise on local it is working fine )
That suggests that it's not at all the code that you are showing that is causing the problem, but how you transfer the string.
How are you sending the string? If you for example put it in a query string in an URL without properly URL encoding it, a + character would be interpreted as a space character when the string is URL decoded.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hello Guffa ,
Thanks for replying me.
I m confused because it is working fine on local
And only creating error when it is online,
I m transfering the encrypted value along with the url,
Please explain me how to do properly URL encoding.
Regards,
rahul saini
|
|
|
|
|
Use the Server.UrlEncode method on the value before you put it in the URL.
---
single minded; short sighted; long gone;
|
|
|
|
|
What does cipherString contains it should not containg string it should contain
s is composed of base 64 digits, white space characters, and trailing padding characters
The format of cipherString is invalid. s contains a non-base 64 character, more than two padding characters, or a non-white space character among the padding characters.
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
Hello Everybody,
I m encrypting and decrypting the string.
When ever an string is encrypted and that encrypted value contains an '+' sign in it the it creates the following error(when it is online otherwise on local it is working fine )
Invalid length for a Base-64 char array.
it shows erroe in following line while decrypting :
byte[] toEncryptArray = Convert.FromBase64String(cipherString);
I am not able to understand why it is happing.
Regards,
rahul saini
|
|
|
|
|
The best way to write your own algorithm to Encrypt and decrypt the data
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
Hi All,
1.Can we use contorl.focus() property for setting focus for a control in VS.NET 2003 ?
2.Can we use contorl.focus() property for setting focus for a control in VS.NET 2005 ?
Thanks,
|
|
|
|
|
Hi,
you can use defaultfocus property for that control or use SampleControl.Focus() Method
|
|
|
|
|
Hi ,How u suggested defaultFocus property.Is there any property for controls in .Net2003/.Net2005.Justify u r self and reply back to me and also I asked 2 Questions Simlar ones better to pointout u r ans indicating Question no
/*
you can use defaultfocus property for that control or use SampleControl.Focus() Method
*/
|
|
|
|
|
|
how to sort a dataset?? i want to sort a column inside a dataset.
Adrian De Battista - Web Designer, Web Programmer, Software Programmer From Malta. My Website .. www.MaltaTrade.org
|
|
|
|
|
hi,
i would like to ask something before giving answer.
would u like to sort the entire table with respect to a particular column or u just want to sort the column.
|
|
|
|
|
All i have is just one column. I need to sort it in ascending order. I need to use the dataset but.
Adrian De Battista - Web Designer, Web Programmer, Software Programmer From Malta. My Website .. www.MaltaTrade.org
|
|
|
|
|
You could create a DataView from the table you want to sort:
<br />
DataSet ds = getMyDataSet();<br />
DataView dv = new DataView(ds.Tables["theTableNameToSort"]);<br />
dv.Sort = "myCoulmnName ASC";
Hope it helps
Thomas
|
|
|
|
|
how can i then send the dataview inside a dataset??
Adrian De Battista - Web Designer, Web Programmer, Software Programmer From Malta. My Website .. www.MaltaTrade.org
|
|
|
|
|
Maby:
ds.Tables["theTableNameToSort"] = dv.Table;
|
|
|
|
|
Hi,
My page has one DropDownList.
Dropdownlist is binded with DataTable(with one Field) having morethan 100 items.
Now how to set the 99th Item as selectedItem of DropdownList in the page loading itself.
I know the ItemName and value, don't know the index of it.
By using loops its ok.
But it is weaste of our processing time.
Is there any other way to do it.
Thanks
Hari
|
|
|
|
|
Try assigning the item index directly like
dropdown.selecteditemindex = 98
|
|
|
|
|
dropdown.SelectedIndex= Index
dropdown.SelectedValue="your value"
and chick :
dropdown.AutoPostBack = True
|
|
|
|
|
if you know the value then simply you can give dropdownlistid.selectedValue = "value" so that item is selected!!
Gautham
|
|
|
|
|
Why not do it on the page itself:
<br />
asp:DropDownList id="ddlMyList" runat="server" SelectedIndex="<%#ddlMyList.Items.IndexOf(ddlMyList.Items.FindByValue(strTheValueToSelect))%>"<br />
asp:DropDownList><br />
Hope it helps
Thomas
|
|
|
|
|
Yes you can do it without going through loop if index of the item is known. it will not change its index
try this after adding the values to dd
Views.Items[2].Selected=true;
or use this code
int index=Views.Items.IndexOf(new ListItem("String of element"));
Views.Items[index].Selected = true;
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
Hi All,
I have created a Web Application using ASP.NET 2.0.But when I am going to debug the Application,BreakPoints are going to be invisible.So I am unable to debug the Program.
How can I avoid that Problem?
Thanks in advance.
|
|
|
|