|
Hi,
i have one grid view which contains 3 Template columns.
These three columns contains labels in Item template
First two columsn contains text boxes and third column contain fileupload control in edit mode.
In Edit mode, when i upload file(.pdf) up to 3 MB, the application is working fine.
If i upload 5MB file, then click on update button, in browser it displaying that 'The Page Cannot be displayed'.
Why it is happening ? how to rectify this ? How can upload the file with large size?
G. Satish
|
|
|
|
|
Answered more than 1000 times. Why don't you do a search before putting it here ? With the default settings, ASP.NET permits only to upload files with 4MB size. You need to set maxRequestLength in the web.config. Check this KB[^]
|
|
|
|
|
This is Arun, when i use FileUpLoad Control in UpdatePanel , it is not working but without updatepanel the control is working. The Problem is . when i upload a file the Hasfile Property tells the file is not present . The same is working when updatepanel is not used . How to solve this.
ArunVijay
|
|
|
|
|
Hi Arun,
Read this[^] first. And this[^] was my first hit when I googled.
|
|
|
|
|
How can i see the session info added in one ie window from another ie window (Opened independiently and not using ctrl + n)
Im having a problem with this, because users add stuff to their session, when they try to checkout, if they are not registered, they are sent to register, im using email verification (sending them a link to the email they used to register), when they click on the link (from outlook or ie) a new windows opens and sends them to my site again and their account gets activated, the thing is that in the new opened window, there are no things on their session, they would have to close that window and come back to the first window or add items again in the new window
I wouldnt like the user to have to do this, not all wil always do it, some will get confused
Is there any access the session items in either window?
Im using sessions with cookies
Also, im using asp.net membership, if im logged in, when i open a new window, i doesnt logme in automatically, shouldnt it authenticate me?
Alexei Rodriguez
|
|
|
|
|
AlexeiXX3 wrote: How can i see the session info added in one ie window from another ie window (Opened independiently and not using ctrl + n)
AFAIK, session will be shared between multiple windows if second window is opened by the window where session is created. In your case, you are getting totally new window, so you can't share the session.
I think your design is broken. You should not keep the cart items in session. You can keep it in database with user id. When they check out, delete from this table, so that you are able to reload the data back to the cart when they completes the email verification. If you plan to continue with the current design, I have the following suggestion.
Daniel vaughan has written an excellent article here[^] on object serialization. You may follow that approach to serialize your object which is in the session, then append it with the link you send for email verification. When the email verification link is clicked, take value from query string, de-serialize the value and assign to session. But if your object is big, I am afraid this won't work as expected.
Hope this helps.
|
|
|
|
|
Hi All,
I am using C# , asp.net2.0 , Ajax1.0
i am filling dropdownlist using cascading ajax extender. i taken help of ajax site and build a code to fill the control.
my question is how do i get parent selected item value. my web service code to fill target value
<code> public CascadingDropDownNameValue[] GetProd(string knownCategoryValues , string category)
{
StringDictionary kv = CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues);
//string subgrp ;
//int sub1;
//if (!kv.ContainsKey("Prod") || !Int32.TryParse(kv["Prod"], out sub1))
//// if (!kv.ContainsKey("Prod"))
//{
// return null;
//}
DsprdTableAdapters.SPGETPRODUCT_GIVENSUBTableAdapter prd = new DsprdTableAdapters.SPGETPRODUCT_GIVENSUBTableAdapter();
Dsprd.SPGETPRODUCT_GIVENSUBDataTable prdgrp = prd.GetProd(kv["Prod"]);
List<CascadingDropDownNameValue> values = new List<CascadingDropDownNameValue>();
foreach (DataRow dr in prdgrp)
{
values.Add(new CascadingDropDownNameValue((string)dr["PM_PRD_NAME"], dr["PM_PRD_CODE"].ToString()));
}
return values.ToArray();
}
</code>
This is giving me no out put as kv["Prod"] is showing null value.
Cascading code in aspx is
<code><ajaxToolkit:CascadingDropDown ID="cddPROD"
runat="server"
TargetControlID="Ddlproduct"
ParentControlID="Ddlsubdiv"
Category="Prod"
PromptText="Choose a Product...."
LoadingText="Please wait ..."
ServicePath="../Prod.asmx"
ServiceMethod="GetProd" />
Please Suggest
</code>
regards
imran khan
|
|
|
|
|
The GridView in question is displaying data correctly.
However, when I pass some of them by using dynamic links on the GridView, they showup as empty strings. Here's my code:
<br />
protected void gvStatus_RowDataBound(object sender, GridViewRowEventArgs e)<br />
{<br />
string fName,stnID,submitBy;<br />
if (e.Row.RowType == DataControlRowType.DataRow)<br />
{<br />
fName = Convert.ToString((gvStatus.DataKeys[e.Row.RowIndex].Values["FILE_NAME"]));<br />
stnID = Convert.ToString((gvStatus.DataKeys[e.Row.RowIndex].Values["STATION_ID"]));<br />
submitBy = Convert.ToString((gvStatus.DataKeys[e.Row.RowIndex].Values["SUBMITTEDBY"]));<br />
LinkButton url = (LinkButton)e.Row.FindControl("lnkAction");<br />
url.PostBackUrl = "statdetails.aspx" + "?File=" + fName.ToString() + "&Station="<br />
+ stnID.ToString() + "&SubmittedBy=" + submitBy; <br />
}<br />
}<br />
I get => "...statdetails.aspx?File=&Station=&SubmittedBy="
I checked the strings and they are empty.
So, data is on the GridView from the same query, but when I try to get them from there, looks like something going wrong.
Any idea?
Thanks.
Ekjon
|
|
|
|
|
You can use datarowview instead
Dim R as datarowview = e.row.dataitem
fName = Convert.ToString((r.item["FILE_NAME"]));
stnID = Convert.ToString((r.item["STATION_ID"]));
submitBy = Convert.ToString((r.item["SUBMITTEDBY"]));
Alexei Rodriguez
|
|
|
|
|
Hi, i'm used Visual Studio 2008 Pro to create and publish
my website. Everything seemed to be successful but when
i tried to go to the page online i get this error:
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customerrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customerrors> tag should then have its "mode" attribute set to "Off".
It works fine in my virtual directory but not the server.
This is for a class and your help is greatly appreciated!!
Phivos
|
|
|
|
|
You need to disable custom errors to view the actual error message.
Follow the instructions provided to you in the error message to do this.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hello Friend,
Follow Below Steps To solve This Problem(It has been tested on Visual Studio 2005)
1)Check your DataBase Connection has properly configured in webconfig .
2)Check the server system for IIS (inetpub) . If not Load it.
3)In Visual Studio -> go to command prompt there type aspnet_regiis -i. (Command Editor Of IIS)
4)close all application and restart your visual studio and check..
5)ping for ip address of server machine .
6) e.g (xx.xxx.xxx.xxx/ProjectName/EgPage.aspx.
7) Any problem Contact i will do my best.
ArunVijay
|
|
|
|
|
Hello Friend,
Follow Below Steps To solve This Problem(It has been tested on Visual Studio 2005)
1)Check your DataBase Connection has properly configured in webconfig .
2)Check the server system for IIS (inetpub) . If not Load it.
3)In Visual Studio -> go to command prompt there type aspnet_regiis -i. (Command Editor Of IIS)
4)close all application and restart your visual studio and check..
5)ping for ip address of server machine .
6) e.g (xx.xxx.xxx.xxx/ProjectName/EgPage.aspx.
7) Any problem Contact i will do my best.
ArunVijay
|
|
|
|
|
Thanks for your reply,
I realized after removing those lines from the web.config that new ones errors
come up and they seem to be similar. It cannot load the following files or assemblies:
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089">
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089">
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089">
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
I also tried removing them and then adding the references again!
any ideas?
Thanks!
|
|
|
|
|
Thanks for your reply,
I realized after removing those lines from the web.config that new ones errors
come up and they seem to be similar. It cannot load the following files or assemblies:
add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"
add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"
add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"
add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
I also tried removing them and then adding the references again!
any ideas?
Thanks!
|
|
|
|
|
VS2005
I'm working on a web site that is working on the server on which it resides. It is completely undocumented, and has very few actual comments. I have not yet modified any of the code. However, when I try to run the site, I get the following:
<%@ Master Language="C#" EnableTheming="false" AutoEventWireup="true" CodeFile="mp_Main.master.cs" Inherits="mp_Main" %>
The error I'm getting is: "Master" is not a valid attribute of element "Page". Keep in mind that the line of code above is the very first thing in the file.
Secondly, the compiler is telling me it can't find a file, yet the file exists just plain as day.
WTF is going on here?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
mine reads:
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="SlaSyConOSNL.master.cs" Inherits="SlaSyConOSNL.SlaSyConOSNL" %>
|
|
|
|
|
I am using Asp.Net 2.0 (c#) and SQL2005.
I have a simple table with following info:
Column 1: bigint - unique id count field
Column 2: varchar - name of organisation
Column 3: DataTime - date record added
I basically need to show those records that are still valid. By valid i mean those records which have have an input date (column 3) of upto 2 years ago. Once the input DateTime is more than 2 years ago the record should no longer be shown.
Please can you give me help / ideas / info on how i can acheive this.
Many many thanks in advance!
|
|
|
|
|
In T-SQL this is one of the possibilities:
declare @date as varchar(15) <br />
set @date = '2008-04-15'
select * from myTable where Datetime >= convert(varchar(15),cast(@date as datetime),102)<br />
and datetime<= convert(varchar(15),(cast(@date as datetime)-365*2),102)
instead format date 102 use ur according format
Hope it helps...
I Love T-SQL
modified on Tuesday, April 15, 2008 7:20 PM
|
|
|
|
|
Thanks for the help!!!!!
However my SQL knowledge is limited, and i dont know what you mean about '102 date format'.
My dates arebeing stored in the format: '15/04/2008 00:00:00' eg Month/Day/Year.
Which code do i use for this?
Thanks again.
|
|
|
|
|
The 102 datetime format gives u this format yyyy.MM.dd
Try to run that code on Query Analyzer and see if it is according to your need, if not then fell free to ask
I Love T-SQL
|
|
|
|
|
Hi,
Ive tried running it and im getting absolutely nothing back. Ive updated the SQL as such for my table/data:
declare @date as varchar(15)
set @date = '2008-04-16'
select * from tbl_QualityStandard where qs_Start >= convert(varchar(15),cast(@date as datetime),102)
and qs_Start <= convert(varchar(15),(cast(@date as datetime)-365*2),102)
|
|
|
|
|
do u have recoreded data in qs_Start column:
qs_Start<br />
2008-04-16<br />
2008-04-15<br />
2008-04-14<br />
2008-04-13
or
qs_Start<br />
2008.04.16<br />
2008.04.15<br />
2008.04.14<br />
2008.04.13
or write me how u have inserted data in qs_start column
I Love T-SQL
|
|
|
|
|
Hi,
My date format is:
15/04/2008 eg day/month/year
|
|
|
|
|
try this
declare @date as varchar(15)<br />
set @date = '2008-04-16'<br />
select * from tbl_QualityStandard where qs_Start >= convert(varchar(15),cast(@date as datetime),103)<br />
and qs_Start <= convert(varchar(15),(cast(@date as datetime)-365*2),103)
I Love T-SQL
|
|
|
|
|