Security :: Want To Generate A Username With 6 Char First 2 Char The 1st Letters Of Name And Remaining 4?

Mar 22, 2010

i'm a new developer...i have been given a project to generate a user name of 6 chars. the user name has 1st 2 char the 1st 2 letters of the name and remaining 4 char as any random numbers. alone with that i have to send a random password with it..

View 2 Replies


Similar Messages:

Split Richtextbox Text By Enter Char Then Generate Xml File From The Items

Dec 3, 2010

i need to split richtextbox text by enter char an then generate an xml file from the items.

View 7 Replies

MVC :: Error In Url When Contain "%" Char?

May 27, 2010

when I add "%" character to the mvc url prject I get bad request from server , how to let such character to be allowed in the url I want this to work if possible/Home/%2fContentFiles%2fImages%2f2.jpg/194/184/w if I remove "%" it work fine

View 4 Replies

Converting Char To Lowercase?

Feb 25, 2011

I have a list XML elements that I need to compare to chars in an array. Some of the XML elements start with uppercase characters and some dont.

So I need to convert the XML elements to lowercase to compare them against "alphabet".

I'm doing this by converting the XML element to a string. Then setting that to lowercase. Then converting that to a char. Then comparing that to each char in "alphabet".

Is there a better way to get the XML into lowercase? IE without the two conversions

[Code]....

View 1 Replies

C# - Replace Char In A String?

Sep 13, 2010

how to change

XXX@YYY.ZZZ into XXX_YYY_ZZZ

One way i know is to use the string.replace(char, char) method,

but i want to replace "@" & "." The above method replaces just one char.

one more case is what if i have XX.X@YYY.ZZZ...

i still want the output to look like XX.X_YYY_ZZZ

View 8 Replies

VS 2008 - Is Any Meaning Of # Char In Page Url

Apr 21, 2010

is any meaning of # char in page url... u can see this in below [URL] see in last #tile=outlook...

View 12 Replies

Double Quotes Being Replaced With ' + CHAR(34) + ' In SQL - How To Fix It

Aug 23, 2010

I am using SQL Server 2008 Web Edition and it seems my SQL queries are automagically having the double quotes replaced with ' + CHAR(34) + '. I am trying to pin down why this is happening, I am using Delphi with ASP.NET and using the ADO.NET object for the SQL.

Has anyone come across this before?

View 2 Replies

Converting Char To Integer Representation C#?

Mar 9, 2011

When I try to run the following code it always spits out the hex representation, not the integer representation. Most of the examples I found on MSDN said this should work. What am I missing?

var stringBuilder = new StringBuilder("8");
int j = 0;
foreach (char item in stringBuilder.ToString())
{
j = Convert.ToInt32(item); //returns 38, need return to be 56
}

edit I should have made clear that I know the difference it's returning the hex value. I'm outputting the value to a file, and in that file, it still shows the hex value, not the integer, so I don't think it has anything to do with the debugging environment. edit2 Looks like a PEBKAC problem. Looked at the code that was writing to the file, and it was using a .toString("X") method, changing it to a Hex value. The fact that it was hex in my debug environment was what confused me.

View 5 Replies

Web Forms :: Convert Char To Double?

Sep 6, 2010

i wanna convert char to double type and convert it to date.char->double then double -> date type.I have a whole string and i trim it into 3 parts. In my item(2) is a UNIX Timestamp i'm trying to convert it into date type.

[Code]....

View 2 Replies

How To Make A Password Char In Console

Sep 7, 2011

I was looking for how to make a password char in console. I solved it it with this [URL] ....

But is there anyway to read the password and if its GOOD, it change the pass tthe word "RIGHT Password" And if its wrong make it "Bad password", then make a new line with again. "Enter password"....

View 2 Replies

MVC :: Invalid Length For A Base-64 Char Array?

Aug 4, 2010

I use asp.net + MVC1.0 and in a webpage I have several forms, within each forms I have called the following function

AntiForgeryToken() to generate a hidden value, and in Controller function I have a validate attribute.

When I use JMeter and capture the token using regular expression then post the token with my form to server, I found it throw such a exception:

<html>

View 2 Replies

Access Query Requires % Char In Like String?

Jan 11, 2010

I am building a page which has to search an access table with the text input entered by the user. The thing that is puzzling to me is that the functionality works only when a '%' is explicitly added to the text input at the begginning and end.

If I add '%' programattically in the code behind file, it does not work.
code snippet ( asp page):

<asp:AccessDataSource ID="AccessDataSourcex" runat="server"
DataFile="~/App_Data/company.mdb"
SelectCommand="SELECT [ID], [emp name] AS emp_name, [emp title] AS emp_title FROM [EmpMain] WHERE ([emp name] like [code]...

//the below line is of no use, the % char has to be in the text input

//txtSearch.Text = "%" + txtSearch.Text + "%";

GridView1.DataBind(); <---- this works fine

<--- this does not work, even if I add % chars programatically..


My question is: why does it not work when I programattically add the '%' chars to the search string..

View 3 Replies

DataSource Controls :: Difference Between Char And Varchar?

Apr 4, 2010

What are the basic difference between the char and varchar datatype ?

View 5 Replies

DataSource Controls :: Use Char B/c That Is The Correct Datatype In SQL?

Mar 17, 2010

I'm using DAAB from MS Ent Library 4.1. I have this function in my DAL that returns a dataset.

[Code]....

However, it is failing with this error:Failed to convert parameter value from a String to a Boolean.
But if I use SqlDbType.VarChar instead it works fine. I want to use Char b/c that is the correct datatype in SQL.In my SP the param is @CUSTNMBR char(15). In my database table the field is also char(15).

View 3 Replies

ADO.NET :: Convert Selection Of Date Field Into Char (10)?

Mar 22, 2011

Let's say I am pulling data from SQL using a function that returns one field - date. I can see that in my model code for a getter, setter, and other things are set for DateTime. What happens if I go into the function and convert selection of my date field into char(10)?

View 6 Replies

VS 2015 - Decrypt String Stored As A Char

Nov 18, 2015

I have the following string stored in a char column of sql server (there are several this one is just an example):

Code:
ROix5LkY0Zps4MPcWnSmiw==

I also have the key used to generate the string:

Code:
6B9245B1A88A82FC328C8A1B8870E34D

And I found the following solution to decryp and encrypt:

Code:
Dim des As New TripleDESCryptoServiceProvider
Dim md5 As New MD5CryptoServiceProvider
'hash function
Function md5hash(value As String) As Byte()
Return md5.ComputeHash(ASCIIEncoding.ASCII.GetBytes(value))
End Function

[Code] ...

It works like a charm when i encrypt and decrypt values set by me in the page;

But when i use the value stored in the DB it throws the following error;

"An exception of type 'System.Security.Cryptography.CryptographicException' occurred in mscorlib.dll but was not handled in user code

Additional information: Bad Data."

I am i using the wrong crypto class ? it's a length issue? the string is not base64?

View 12 Replies

Error: Object Expected Code 0 Char 1 Line 474

Feb 18, 2010

done some html code updates on my company's asp.net website and the above error appears.

i dont have a line 474 on the errored file.

this error only on IE, and not FF.

View 4 Replies

Forms Data Controls :: How To Remove Char From Gridview

Dec 1, 2010

i designed my gridview like below

<ItemTemplate>
<table>
<tr
class="searchtext">

[Code]....

View 9 Replies

C# - Why Request.QueryString Replace + With Empty Char In Some Cases

Jul 28, 2010

I have a problem that if I pass a string that contain + in a query string and try to read it , it get the same string but by replacing + with empty charFor example if i pass query like ../Page.aspx?data=sdf1+sdf then in page load I read data by data = Request.QueryString["data"] it will get as below data ="sdf1 sdf"
I solve the problem by replacing any empty char with + .. But Is there any problem that cause that ? and Is my solution by replacing empty char with + is the best solution in all cases?

View 1 Replies

Web Forms :: DataBinding / System Char Does Not Contain A Property With Name Photo

Jun 16, 2015

I m binding a datalist with the dataset through stored procedure which has a column 'Photo' but it is giving me this error

View 1 Replies

Javascript - Error On Page , Line 741, Char 5 Object Expected?

Mar 3, 2011

Below is my page code. Getting a error on Page, line 741, Char 5. Object expected.

<%@ Page Title="" Language="VB" MasterPageFile="~/Home.master" AutoEventWireup="false"
CodeFile="HSDDetails.aspx.vb" Inherits="_Default" %> [code]....

View 1 Replies

C# - Invalid Length For A Base-64 Char Array During Decoding / Decryption?

Dec 29, 2010

Q: I face the following big problem :

from time to another i find the following exception:

Invalid length for a Base-64 char array I use encryption and decryption: public static string Encrypt(string text)

[Code]....

View 1 Replies

Forms Data Controls :: DataBinding: 'System.Char' Does Not Contain A Property?

Jul 30, 2010

I am having a problem about my gridview when it binds to an accessdatasource.

The error appears:

"DataBinding: 'System.Char' does not contain a property with the name 'Firstname'."

Here's my gridview:

[Code]....

Here's my code behind:

[Code]....

The error occurs when the selected index of the DDL is 1 and I have to bind it in an accessdatasource. First condition is working fine where I will check a value and put all items that matched the date criteria in a data table and then bind gridview in the data table.

The error is just when I bind my gridview in the accessdatasource.

AccessDataSource1.SelectCommand = "Select Firstname,Middlename,Lastname,Jobseeker.IdNo,SchDate,Time,Venue,JobPosting.JobCode,JobTitle from JobPosting INNER JOIN (Jobseeker INNER JOIN ApplicationProgress ON Jobseeker.IdNo = ApplicationProgress.IdNo) ON JobPosting.JobCode
= ApplicationProgress.JobCode where PostingHr = " & Session("Id") & " and SchDate = '" & Date.Today.ToString("dd - MMM - yyyy") & "' "
GridView1.DataSource = "AccessDataSource1"
GridView1.DataBind()

View 3 Replies

Web Forms :: System.FormatException / Invalid Length For A Base-64 Char Array?

Oct 7, 2010

it is really annoying that I am keep getting these error. what is that. we started to get this afte we updatet the net framawork for security vulnaribility. here is the error we keep getting. but not everytime;

System.FormatException: Invalid length for a Base-64 char array.

Generated: Thu, 07 Oct 2010 04:05:16 GMT

System.Web.HttpException: The state information is invalid for this page and might be corrupted. ---> System.Web.UI.ViewStateException: Invalid viewstate.

[Code]....

View 1 Replies

Forms Data Controls :: DataBinding: 'System.Char' Does Not Contain A Property With The Name 'UserId'.?

Jul 28, 2010

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)

View 8 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved