|
Hello friends,
I am displaying my reports in pdf format..This reports are opened in Acrobat Reader 7.0..This is working right on my pc..but on client machine it is giving error..of 'Access Denied'..Is there any setting in IIS to allow pdf file to show or it is the problem of the Acrobat REader?
Help me..guys...Thank you..
|
|
|
|
|
It is most likely a file permission problem. On your development machine you will be running as yourself (if you are running Visual Studio's built in web server). On IIS your web application will be running in a protected/restricted account.
Does the directory that contain the PDFs permit IIS to read its contents? (You can find out which account IIS is using by going to the properties for the website/virtual directory in IIS and selecting the "Directory Security" tab. Then pressing the "Edit..." button in "Anonymous access and authentication control" and seeing what the settings are.
|
|
|
|
|
Hi to all,
I have a problem in updating the datagrid.
The scenerio is: I am having a datagrid on my page.I am basically working on shopping cart.Whenever user selects any the product it should be displayed in the datagrid(ie my cart).Suppose the user continues the shopping and he again selects one of the product.Then it should be added below the first row in the datagrid.
But I am not getting this result.Whenever I add another item in my cart ,it will replace the previous one.
I have tried it as:
protected void Page_Load(object sender, EventArgs e)
{
if (Session["Cart"] == null)
{
get_data();
Session["Cart"] = dt;
}
else
{
dt = (DataTable)Session["Cart"];
get_data();
}
}
public void get_data()
{
dt = new DataTable();
dt.Columns.Add("REF", typeof(string));
dt.Columns.Add("Description", typeof(string));
dt.Columns.Add("QTY", typeof(int));
dt.Columns.Add("Price", typeof(float));
dt.Columns.Add("Cost", typeof(float));
pro_id = Request.QueryString["pr_id"];
quanti = Convert.ToInt32(Request.QueryString["quant"]);
SqlConnection con = new SqlConnection("Server=.; Database=eclsc; Trusted_Connection=yes");
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "select ICEMACHINES.product_id,ICEMACHINES.sh_desc,ICEMACHINES.price from ICEMACHINES where ICEMACHINES.product_id LIKE @product_id union select GLASSWARE.product_id,GLASSWARE.sh_desc,GLASSWARE.price from GLASSWARE where GLASSWARE.product_id LIKE @product_id ";
cmd.Parameters.Add("@product_id", SqlDbType.NVarChar, 50).Value = pro_id;
cmd.Connection.Open();
SqlDataReader rdr = cmd.ExecuteReader();
ArrayList arRole1 = new ArrayList();
while (rdr.Read())
{
desc = (rdr["sh_desc"]).ToString();
id = (rdr["product_id"]).ToString();
unitprice = Convert.ToSingle((rdr["price"]));
cost = unitprice * quanti;
arRole1.Add(rdr["product_id"]);
arRole1.Add(rdr["sh_desc"]);
}
cmd.Connection.Close();
DataRow myrow = dt.NewRow();
myrow["REF"] = id;
myrow["Description"] = desc;
myrow["QTY"] = quanti;
myrow["Price"] = unitprice;
myrow["Cost"] = cost;
dt.Rows.Add(myrow);
dt.AcceptChanges();
DataGrid2.DataSource = dt;
DataGrid2.DataBind();
}
Please give me some idea where I am lacking.
Thanks in advance!
cheers,
sneha
|
|
|
|
|
sneha Choudhary wrote: dt = (DataTable)Session["Cart"];
get_data();
I suppose dt is a page level DataTable
You are fetching it from session and assigning to dt
sneha Choudhary wrote: public void get_data()
{
dt = new DataTable();
Then in your function get_data you are reallocating memory
dt = new DataTable();
The above line will clear reallocate memory to datatable and hence destroy all the previous values
At last
sneha Choudhary wrote: if (Session["Cart"] == null)
{
get_data();
Session["Cart"] = dt;
}
You are overwriting session.
Trouble is in line
dt = new DataTable();
|
|
|
|
|
Hi,
I want to display a list of n(might cross 100) number of items on the page in a ListBox.
But just for the convenience of the user, I want each ListBox item with a checkbox. So that the user can easily select multiple items & he doesn't need to keep pressed ctrl key while selecting multiple items. There is a control CheckedListBox,but it is available for Windows forms only,and not in ASP.Net.
How can I achieve my requirement?Kindly give some guidance.
Thank You.
|
|
|
|
|
what exactly you want to do.
cheers,
sneha
|
|
|
|
|
sneha Choudhary wrote: what exactly you want to do
He want to do CheckBox List like This[^]
|
|
|
|
|
First of all I want know that Why your trying to do this ? If there is more than 100 Chekbox , How many of them user will select ? So first think about your design !!
Now come back to your Solution. If I am not wrong you want some thing This[^](Check Langauge, Platform, Technology.. Section ) .
There are multiple approaches to solve this .
1. You can create them at runtime, placed it inside a Div, which should have scroll option. [ Performance overhead is there ]
2. Simple way to use GridView, use Check box Template Field .
3. Create your own custom control.
|
|
|
|
|
Hey,thanx for your reply. Well,by default all the items(may be 5-100) will be selected. But,just wanted to allow the user to disselect any item,if he wants to. Otherwise there is no compulsion of having such design.
Anyways,thanx for those suggestions .I'll try to get the desired output using them.
|
|
|
|
|
Morning,
I am specifically looking for syntax highlighting in an ASP.NET environment.
All components I can find are built for C# or windows forms. I would like to create a web editor for my aspx, cs, html and css files.
Is this possible? I assume a lot of Javascript will be involved. Any answers out there?
Thanks
|
|
|
|
|
Hi guys,
I'm new to crystal reports and am using Visual Studio 2008 now. When I run my website on visual studio it can display my Crystal Report. But when I deploy it by publishing it to my local IIS, the page comes out. But then the report doesn't load. It's done with errors in page. How do I solve this problem? Thanks in advance! ^^ Cheers~
Regards,
SaberBladeZ
|
|
|
|
|
|
Hi, Thanks for the reply =)
I have found out the problem thanks for the help though =) Now I have got another problem, aligning the report. I created a Table to align it with my side navigations. My table is a 2Column and 2Row. And I place my navigation at the 1:1(Col:Row) and my Report Viewer at (2:2) It seems to not help as the navigation doesn't stay at the top. Instead, it is being moved down when I run the website. Is there any way I can align my navigation so that it does not move? and stay at the spot I put it(Fixed Location) Thanks in Advance! Cheers ^^
|
|
|
|
|
I am creating a bulk emailng system.
I got all the records in datatable with a identity(seq generated from 1 - no. of rows) column.
Now I filter 100 rows from datatable every time to new datatable and get email process done on it.
than i remove those 100 rows from tha main datatable and get next 100 and process till end.
but this piles up the memory after some time and system hangs.
I use gc.collect to remove unused objects from memory but i think thats not a good solution.
so the question is how to dispose memory occupied byu datatable after working on it.
|
|
|
|
|
Member 2363916 wrote:
I use gc.collect to remove unused objects from memory but i think thats not a good solution.
Yes !! This is not a good practice to call GC Explicitly .
Member 2363916 wrote: so the question is how to dispose memory occupied byu datatable after working on it.
Can please just put the line of code for storing and retrieving data from data table.
|
|
|
|
|
I will get main datatable(dtMain) from db
and on filtering like this
dtmain.DefaultView.Rowfilter="Seq < runtimeVariable";
put result into new datatable and work on it
runtimeVariable will increamentedevery time a new chunk is fetched and previus chunk rows will be deleted from main table
|
|
|
|
|
Hi all,
In my main page i am having some link buttons and a login control,when i enter user name and password and press ENTER the page gets refreshed and it doesn't go on to the next page.i.e., how can i trap the enter key?
Thanks in advance....
modified on Tuesday, January 13, 2009 10:58 PM
|
|
|
|
|
sarangkhandare wrote: when i enter user name and password and press ENTER the page gets refreshed and it doesn't go on to the next page.i.e
I believe there should be login/submit button. So Set the button as default button of the page . So when user hit Enter it automatically fire the Submit/Login Button Event.
sarangkhandare wrote: ., how can i trap the enter key?
Yes , you can do it using JavaScript .
Just Explorer event.keyCode
Create JS methods, call that methods on onKeyDown Event and Trap the Key code
|
|
|
|
|
You can enter your redirection code or anything else in LoggedIn event of your login control
Human knowledge belongs to the world
|
|
|
|
|
Mates,
I need help. Could somebody know how to solve this problem. I already search to my friend Google. But, it seems theres no solution.
What I did:
I upload my asp.net files in the server and then trying to run at the browser will not run. If I will run the asp.net files in my localmachine or in my virtual machine this will run.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Source Error:
Line 48: ASP.NET to identify an incoming user.
Line 49: -->
Line 50: <authentication mode="Windows"/>
Line 51: <!--
Line 52: The <customErrors> section enables configuration
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
C#Coudou wrote: I upload my asp.net files in the server and then trying to run at the browser will not run. If I will run the asp.net files in my localmachine or in my virtual machine this will run.
I didn't get your point . Please clarify . What do you mean by upload files on Server ? Did you create Virtual Directory ?
|
|
|
|
|
What i mean is I upload the files (asp.net files) in webhosting server using the ftp in \wwwroot\MyWebsite. I cannot create a virtual directory because it is a webhosting site. I think the problem here is only a security issue on asp files because when i try a html file it will work.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
It sounds like your host has configured the authentication mode in the root web.config, and adjusted the properties for it to prevent modification of the authentication mode. Assuming your using some kind relatively cheap or even free ASP.NET host, it wouldn't be possible to use Windows authentication anyway. You would most probably need to use Forms authentication, which is most likely what they have enabled.
|
|
|
|
|
Can someone please refresh my memory?
What is that validator control to use to make sure a textbox is a valid date but not required.
Thanks.
I didn't get any requirements for the signature
|
|
|
|
|
It depends what kind of validate you need. Email, phone, zip etc. I think you need Regular Expression Validator.
|
|
|
|