Just off the top of my head, I write in vb, not that quick in c sharp. But I put about 10 minutes into it just to test 1 char. I would have to come back to convert the program to test char positions 2-4-6-7. I'm a little fuzzy on integer array, in which I can loop the Integer array of p1 to test 2-4-6-7 in the same loop, and produce a exit code such as 0 for success or 1 for failure.
If I used the integer array of p1 for looping, I could just match the int value to the char position much faster. But that's my weakness.
Dim p1() asInteger = 2467
Anyways this is just a starter thought
ProtectedSub Page_Load(sender AsObject, e As System.EventArgs) HandlesMe.Load
Dim uPassword() AsChar = "fortune"Dim p1 AsInteger = 2Dim p1c AsChar = "r"Dim pMatch AsInteger = 1Dim input(uPassword.Length - 1) AsCharFor i AsInteger = 0To uPassword.Length - 1'Just building the password char array to validate the thought
input(i) = uPassword(i)
If (p1 = i) ThenIf (uPassword(i) = p1c) Then
pMatch = 0EndIfEndIfNext
Response.Write("<span style=""color: black;"">" & input & "</span>" & _
<span style=""color: black;"">" & pMatch.ToString & "</span>")
First on Page_Load the 4 random numbers are generated and store it in one array which
ispublicshared , thenon login buttom i retreve password based on user name to take one record
and store that passwoard on variable (passdbo) then I dolike this
x1 = (arrNumber(0) - 1)
a1 = passdbo.Chars(x1)
x2 = (arrNumber(1) - 1)
a2 = passdbo.Chars(x2)
x3 = (arrNumber(2) - 1)
a3 = passdbo.Chars(x3)
x4 = (arrNumber(3) - 1)
a4 = passdbo.Chars(x4)
passdb = Val(a1 + a2 + a3 + a4)
pass = Val(TextBox2.Text)
IfString.Compare(passdb, pass) Then
MsgBox("Invalid Username OR Password ")
I have a web application,which is causing Aspnet_wp process crashed on peak loads in production environment.Before the process getting crashed, the CPU usage was 100 constantly for some time and memory usage was over 900MB in Task Manager.This process crash did not log any information in Event Viewer.What are the memory usage limitation on the worker process. Is there any way to log the Exception information on process crash ?
i created a masterpage for my project
and i have a problem, i can't exit.
only has 3 options and the exit
i can acces every option and back
but when i back to the menu i can't exit
i try with the event window.close but only the first time
functions, when redirect and back to the menu i can't exit.
<tr><tdclass="style7"colspan="0"><asp:LinkButtonID="lbtn_reglas_negocio_ao0"runat="server"CausesValidation="False"Font-Underline="True"PostBackUrl="~/Pagina1.aspx"style="font-size: large">Consulta Ayudas de Oficina</asp:LinkButton></td></tr><tr><tdclass="style7"colspan="0"><asp:LinkButtonID="lbtnSalir"runat="server"CausesValidation="False"Font-Bold="True"Font-Overline="False"Font-Underline="True"style="font-size: large"onclientclick="window.close();">Salir</asp:LinkButton></td></tr>
I have an asp.net application which is client for a java web service. The java web service internally talks to an IBM database through natural language.
It is said that this java web service doesnt work like "url?wsdl" format. So I am unable to use add service reference for this. I have to create the proxy by using physical path like this "\\xxx\xxx\xxxxx.wsdl" because it doesnt run with "http://xxxx?wsdl".
Is there any way to create proxy for this using wsdl tool.
wsdl.exe accepts both url or local path. You may run into problems using path to a network share, however you can try either copy the file locally or mapping drive for that share (look here[^] for example).
"My software never has bugs. It just develops random features."
I Have a gridview . When i click one of the files in the gridview , it will display the file details in a table in the grid.But if i am in 20th or 19th page of the gridview, after clicking on the file , the grid is comming to page 1. Is there any property for the grid to prevent this.
Basically Viewstate maintain all this information about current page of the grid. check if it is not disabled for you. another way is, you can also store page number in the session and update only when next,previous ,first, last button click or grid is refresh.
Never ever do that. I did twice and 2 diffrent apps and it was always mistake to store anything in session besides some user data valid to user not for some page. For example in one grid there was date filter. Stored in session and empty this caused app to crash in that particular page.
I'm having one web application where within loop I'm running one simple sql query (SQL Server 2008).
Select SNo, NoOfDays, [Month], [Year], [Days], [Holiday] From DaysMonth Where rtrim(Period)='Input' order by ToDate
Based on this query, populating one gridview and then creating records in a new table with other user input.
Now, out of 100 times it's running, 95-98 times it's giving accurate results, however, to my astonishment, sometimes sorting 'Order by' not working and producing abnormal sorting behavior. Like instead of 1st January to 31 January, it's returning 10th Jan-31st Jan then 1st Jan to 9th Jan (just for example). I got puzzled, because I can't do anything to change code, as it's working fine most of the time. Can you suggest some reason behind it which is beyond the code. As the data entry is huge, and it's multi-user environment, getting very difficult to monitor which one query going wrong. In that case, if I delete entries from new table, second time, it's giving perfect result. Please help me and thanks in advance to all.
Richard, I already deleted this question from C# forum. As you are suggesting, I think this is not related to SQL Server and it's muti-user web environment state management related problem. Anyway, if you think so, can I keep this question under this category and create a new thread in Database forum? Thanks for your suggestion.
Even if it was related to SQL Server, it has nothing to do with either C# or ASP.NET. It's pure SQL and you need to give some more information about the field you are using to sort on: i.e. its type and value.
One of these days I'm going to think of a really clever signature.
okay agreed. So I'll delete it from here and create under SQL. However, just to answer your query, 'ToDate' field is a 'Date' type field, not DateTime type. User input Period is a varchar type field, input value like 'January,2012'. Thanks
I have 100 text boxes in my webpage and i want transfer values from one page to another pages in asp.net without using session variable, because i do not want to use 100 session variables, is there is any techniques in asp.net and C#. which make its easier.
You don't have to use session variables. (session object)
one way is to just give a name for each textbox field ( use only pure HTML tags) and prefix or use a suffix to each name. when you submit the page to the server you can just iterate through the values in the Form collection and then use Server.Ttransfer.
suppose i have 100 text box in page and i am transfer value one page to another using session variable but problem is
that i m using so 100 session variable for this but i want i m use only one how can it possible please tell
In the previous post you mention that you don't want to use session variable and now you are saying that you do want to use session variable but only one. Please explain yourself more clearly.
You can use only one session variable if you, lets say, set a List or Dictionary in a session variable with all the values.
in my last technical interview they asked me "if i have 100 text boxes any i want to send data from one page to another page, how could you send data from one page to another" and i told them that i'll use session object, then they told me that it means we have to use 100 session object. so there is any technique in which we can use session object just like as array.
See my first reply. It don't use any session object there.
If you have 10 input tag of type text with name attributes: txt1, txt2, txt3...
After you submit the page to the server you use Request.Form[txt1], Request.Form[txt2]....
No session object.
Hi, I have something I want to understand regarding the oAuth flow in facebook.
I have a facebook application that I created.
When I reach my application site directly (not through facebook) i.e enter my application site URL in the address bar, I reach my application. Let's say: https://myApp.com/fbApp
On the server side there's the oAuth flow ( sending a request for the "code" parameter and then with the "code" parameter another request for the "user access token").
I wanted to know how does Facebook knows who is the user that is making the request for the "code" parameter. I noticed that when I'm loged-in to facebook and I'm going to my site directly (as described above) I'm getting the "user access token" on the server side.
When the first request to facebook is made for the "code" parameter, is their anything else being transferred behind the scenes so facebook knows to identify the current loged-in user?
The 'client id' parameter which is being passed to get the 'code' parameter is the 'app id' which is general to all users so I don't see a user specific info being passed to facebook.
Last Visit: 31-Dec-99 18:00 Last Update: 29-Sep-16 19:46