|
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
|
|
|
|
|
hello
i really dont know the differences between these two.
are they the same?
I want to learn AJAX programming with ASP.NET but i dont know which to learn.
Atlas or AJAX.NET?
|
|
|
|
|
Atlas is what AJAX.NET was called before it was released. You won't learn AJAX that way, it's a framework that hides the details from you, but that makes it a quick and easy solution.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Ajax.NET and Atlas are two frameworks that utilize Ajax technologies. Some of the differences between the two are:
Ajax.NET created, built and tested by one individual. Atlas, created by Microsoft.
Ajax.NET is very low level, you need to create a lot of JavaScript files to benefit from it which gives you great flexibility. Atlas, has a number of prebuilt "controls" and objects with little to no JavaScript.
I have created a presentation on AjaxPro.NET and a users guide at my website.
|
|
|
|
|
Oh - I thought Ajax.NET is what they call ATLAS now ? Oh, it's ASP.NET AJAX. My bad, sorry.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: Oh - I thought Ajax.NET is what they call ATLAS now ? Oh, it's ASP.NET AJAX. My bad, sorry.
Glad I read your post before leaping in with "bollox - they're both the same"
"Knock me down, I'll get straight back up again, I'll come back stronger than a powered up pacman"
(Lilly Allen / Kaiser Chiefs)
|
|
|
|