|
It should work.
For more details have a look at MSDN[^]
Regards,
Satips.
|
|
|
|
|
Hi All
Please help me to create a random security code in aspnet
Example: register yahoo mail, gmail:
-> securyti code is a picture : BDCJWMU9
Thank you
|
|
|
|
|
Hope the article by AzamSharp[^] here in CP will help you.
Regards,
Satips.
|
|
|
|
|
Hi,
I am having this problem with session.
First I login and I assign the userid to a session which I'll will need it throughout the website. When something gone wrong on any of my web page, the session will be gone. May I know why is this happening?
Another problem I face previously is the session keep on loosing itself although I specify a time for it to expire which is longer than what I expect it would be.
Thanks
J Liang
|
|
|
|
|
I have a feeling that this is not the first time you've posted this. This is not an inherent problem in ASP.NET as far as I know. I've been building sites that use the same principle and work seamlessly for hundreds of users at any given time.
I'm certain that ASP.NET does not crumble to dust for small page errors. But if the error you're getting is serious enough to actually hang the worker thread, then it's quite possible that your sessions will be lost and as a consequence, your application will restart. Check the IIS logs to gain some insight into what's happening behind the scene.
First, do a thorough code review. If that does not solve the problem with sessions,
Do the following.
1. Check the ASP.NET and IIS configuration in your web server.
2. Try to publish your site in a different box and check if the problem recurs.
3. Try running your application in a separate application domain in IIS.
A session is but another object in the heap. I dont know much about GC in IIS application domains and how IIS maintains it's worker threads. If you're using VS 2005, does this problem occur even in the inbuilt web server spawned by VS 2005, or do you face problems only when it's hosted in IIS?
SG
|
|
|
|
|
Hi,
Actually this is really my first time posting this question as I'd not been using ASP.NET for 2 years and previously I did not encounter this problem.
But it's alright now, I'd put a check on every page that if the session is null then redirect it to another page using javascript.
Thanks for your reply
J Liang
|
|
|
|
|
:-> Deja Vu can sometimes be misleading.........
SG
|
|
|
|
|
source of "login" in ASP.NET write by C# use OLEDB
|
|
|
|
|
What is the question? What is ment by this post at all?
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
What you have tried so for for this?
This is the place where we can help you, but not to do your work.
If you are a learner go with our best friend and get some links and try to implement it.
then if you get any errors and could not able to proceed further post your error we are here to help you in all aspects.
Regards,
Satips.
|
|
|
|
|
Hi, I'm having a problem with Request.Url.AbsoluteUri
I have 2 pages, that build a web address and they need to know the address entered in.
However one page has the right server in Request.Url.AbsoluteUri while another does not.
The address going in is like http://home.myserver.com:8300/. Both will grab the home.myserver.com but one of the pages will not grab the port. And when I try to get the port it will return it as "80".
What could be different between the 2 pages that could cause this problem.
Thanks,
Mike
|
|
|
|
|
One might be grabbing it at a time when it is on port 80, perhaps a page redirect. Are the two pages on the same server. Give more detail on what you are doing and what is going on.
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
Both pages are in the same server and in the same project/virtual dir. So they should be grabbing the uri the same way.
|
|
|
|
|
BUMP.
I'm trying to return another address in the page load function of each page, however they are returning different uri's?
Any help? This is driving me crazy.
|
|
|
|
|
Is there any proberty settings or any validation or anything that could affect this?
|
|
|
|
|
I have a datagrid that I am trying to use to add data to a database. I made the footer of each column a textbox. I am trying to insert that data into the database but get the following error.
Invalid postback or callback argument.
I can post code if that is needed.
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
Its been a while since I've done some ASP.net work, but heres my question. I need to be able to bind any DataTable to a DataGrid, so ItemTemplates are out of the question, how do I make the identity data column set as non editable? I know I need to override: ItemDataBound. So I can check for an identity column,How do I get the row of data that it is intended to bind if I am using SqlDataSource connected to the DataGrid's DataSource?
-Steven Hicks CPACodeProjectAddict
|
|
|
|
|
In your ItemDataBound event:
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
Dim dr As DataRow = e.Item.DataItem.Row, DataRowView
' do stuff - eg: If dr("fieldname")....
End If
cheers
Fred
|
|
|
|
|
The problem is that I do not know the field name... I need to know the attribute of the field [being the primary key] .
-Steven Hicks CPACodeProjectAddict
|
|
|
|
|
hmm ok I'm not sure you can do this in itemdatabound as you need to set the datakeyfield property of the datagrid itself before binding... if you are binding to a table in a dataset, the PrimaryKey property of the table returns an array of columns that function as primary keys for said table...
Fred
|
|
|
|
|
I have a DataGridView and would like to set the back and fore colors of certain rows based on the data in the table the grid is bound to. How is this done? I've tried looping through the grid and setting the DefaultCellStyle for the rows I want changed, but it doesn't do anything. I would appreciate any help or advice.
|
|
|
|
|
Hi
You want to retrieve each row and assign backcolor.
Eg:
Dim gvr As GridViewRow = GridView1.Rows(i)
gvr.BackColor = Drawing.Color.Beige
like this
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
I have continued to work on this problem and have gotten a little further, but I am still having trouble. First of all, to be clear, I'm working with a DataGridView control. A DataGridViewRow does not have a BackColor property to set. What I'm doing now is looping through each row in the DataGridView and then each cell in that row and setting the style of that cell based on my own criteria. The problem is, that when I call this code in the form load event, it doesn't appear to work. But if I call it from another event that fires after the page has loaded, it DOES work. Does anyone know why this is, or what I can do to work around it? My goal here is that I have a grid that holds records AND related subrecords. I want to do an alternating highlight, but I want to include the subrecords in the highlight, so the highlight is not going to necessarily be every other line. Here is the code I am using:
Dim boolNormal As Boolean = True
Dim sNormal As New DataGridViewCellStyle
sNormal.BackColor = Color.White
sNormal.ForeColor = Color.Black
sNormal.SelectionBackColor = Color.White
sNormal.SelectionForeColor = Color.Black
Dim sContrast As New DataGridViewCellStyle
sContrast.BackColor = gblclrContrastBack
sContrast.ForeColor = gblclrContrastFont
sContrast.SelectionBackColor = gblclrContrastBack
sContrast.SelectionForeColor = gblclrContrastFont
For Each dgvr As DataGridViewRow In dgvFields.Rows
If dgvr.Cells("PDSeq").Value.ToString.Trim.Length = 0 Then
'Main Record
If boolNormal Then
For Each dgvc As DataGridViewCell In dgvr.Cells
dgvc.Style = sNormal
Next
Else
For Each dgvc As DataGridViewCell In dgvr.Cells
dgvc.Style = sContrast
Next
End If
boolNormal = Not boolNormal
Else
'Sub Record
If boolNormal Then
For Each dgvc As DataGridViewCell In dgvr.Cells
dgvc.Style = sContrast
Next
Else
For Each dgvc As DataGridViewCell In dgvr.Cells
dgvc.Style = sNormal
Next
End If
End If
Next
|
|
|
|
|
I finally figured it out. Because my form has so many controls, I have them all on a panel that has it's visibility set to false. Then when the form is done with the page load event, it sets the visibility of the panel to true. This just makes things look nicer when the program is running and the form loads...(you don't see the flicker of the controls being loaded, or the values that are in them during design time). For some reason, the code I use needs to be run AFTER the line of code that sets the visiblity of the form to true. Otherwise it doesn't work. I'm not quite sure why, and I really don't have the time to try and figure it out right now. But thank you for your input and time on this problem. I really appreciate it.
|
|
|
|
|
I think it is a problem by set visible= false
So try this.
Create to CSS classes
.show{ display:block; }
.hide{ display:none; }
to hide
Panel1.CssClass="hide"
to show
Panel1.CssClass="show"
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|