|
i had made one integer type collection editor in web control library project.
the collection gets displayed properly at design time and i am able to add and remove items also but my problem is that value entered at design time does not effect the control at runtime.
Regards,
Ujjaval Modi.
|
|
|
|
|
Best thing is debug your control by putting break points at proper places.
Can't make any conclusion as we don't know what you have coded for the same
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
I have tried debugging the application by putting breakpoints.
Here's the code :
First of all I designed a class for creating a List Collection :
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
namespace Funnel
{
public class SectionValue : CollectionBase
{
public double this[int index]
{
get
{
return ((double)List[index]);
}
set
{
List[index] = value;
}
}
public int Add(double value)
{
return (List.Add(value));
}
public int Add(string value)
{
try
{
double c = Convert.ToDouble(value);
return (List.Add(c));
}
catch (Exception)
{
throw new ArgumentException(string.Format(
"Error converting the given string '{0}' to a color",
value), "value");
}
}
public bool Contains(double value)
{
// If value is not of type Color, this will return false.
return (List.Contains(value));
}
public int IndexOf(double value)
{
return (List.IndexOf(value));
}
public void Insert(int index, double value)
{
List.Insert(index, value);
}
public void Remove(double value)
{
List.Remove(value);
}
public SectionValue(double[] sections) : base()
{
foreach (double s in sections)
{
this.Add(s);
}
}
public SectionValue()
: base()
{}
}
}
Then I use object of the class in my control as follows :
protected SectionValue m_SectionValue;
and write property for it as follows :
[Bindable(true)
, Category("Appearance")
, Browsable(true)
, PersistenceMode(PersistenceMode.Attribute)
, DesignerSerializationVisibility(DesignerSerializationVisibility.Content)
]
public SectionValue UserDefinedSection
{
get
{
if (m_SectionValue == null)
m_SectionValue = new SectionValue();
return m_SectionValue;
}
set
{
m_SectionValue = value;
}
}
Now this code is working perfectly regarding displaying the collection editor and add/deleting values from it. Even I am able to add/delete values from code-behind.
But the values added during design time do not get reflected at run-time. If I assign values to collection from code-behind file then the values get reflected at run-time but not from design-time.
Regards,
Ujjaval Modi.
|
|
|
|
|
hi,
how to provide authentication in asp.net application.
here my application run well when i debug.but it show error at web.cofig when i run through url.
error:
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 27: ASP.NET to identify an incoming user.
Line 28: -->
Line 29: <authentication/>
Line 30:
Line 31:
Source File: D:\mtallotment\mwindialogo\web.config Line: 29
venkat
|
|
|
|
|
I have been looking around on different sites and fora, and i have a similar
problem than some people had before...
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.
this is the solution i've read (almost everywhere)
"You need to create an application or a virtual directory ( with the IIS
Manager ) for the directory in which the code is placed."
Since I have several subfolders in my app, that would mean that I have to
make an application of every single folder?
There has to be another solution, or am I wrong ?
Thanks and Regards
Aavesh Agarwal
|
|
|
|
|
Hi all,
i want to know onething in asp.net2.0 we dont have any dll.
when we deploy any application on server we just copy the aspx pages and rest of the folders including bin folder but in that bin folder we didn't find any dll of the project..and we know that for running a particular project we require dll then how the project run succesfully on server without dll...
can anyone tell me i have done so much googling but didn't find the ans.
Thanks in advance
Thanks and Regards
Aavesh Agarwal
|
|
|
|
|
hi !!
I am having a dll added in my project. Now I have updated one of the .cs files in the dll after adding to project and built the project . But it does not shows in bin folder that a new dll is created ... it shows the old dll(because tiem of creation is proevious one)
How to get the update in cs file reflected in the dll.
Mrinal
|
|
|
|
|
when you are compling your project it will automatically upadte ur dll...
Can u eleborate more ur question....
Thanks and Regards
Aavesh Agarwal
|
|
|
|
|
I have been assigned a project and I am a beginner . There is a dll added in the project. There are 6 .cs files in it and the namespace is BAL10
Now I have updated one of the .cs files and then built the project (web project ).But when I went into the bin folder to see if the dll has been updated , there was no change. The dll present was of come previous time.
do hlp me outta
Mrinal
|
|
|
|
|
The project has been converted from 2003 to 2005 .. is this the possible reason behind
Mrinal
|
|
|
|
|
Hi,
I am in a problem friends,
I want to pass my values through header from one page to another in asp.net ..i didn't get any solution for that please anybody share your ideas...
regards
alex.
|
|
|
|
|
Why do you want to send values in header it should only contain the inforamtion of its body
Any way check the response.addheader methos there check what parameters it takes
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Malayil alex wrote: through header from one page to another in asp.net
HTTP header ? or through URL ?
|
|
|
|
|
ya thorugh HTTP header..
regards
alex
|
|
|
|
|
Adding values to HTTPHeader on page level is not possible. You need to write a HTTPModule or a class that inherits from HttpApplication . Write your header value adding code in BeginRequest event.
|
|
|
|
|
N a v a n e e t h wrote: Adding values to HTTPHeader on page level is not possible.
Yes it is. I did it just the other day. Here is the actual code that I used:
Response.AddHeader("Content-Disposition", "attachment; filename=\"" + file.FileName + "\"");
---
single minded; short sighted; long gone;
|
|
|
|
|
Guffa wrote: Response.AddHeader("Content-Disposition", "attachment; filename=\"" + file.FileName + "\"");
That's great. Let me check it..
|
|
|
|
|
i gave same reply :->
check first reply yo this thread but i think subject has relied less on me
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
hi
where will i add this code,,,page_load or ???
alex.
|
|
|
|
|
Malayil alex wrote: where will i add this code,,,page_load or ???
Yes.
---
single minded; short sighted; long gone;
|
|
|
|
|
You can only send information from the server to the browser using the HTTP header. It doesn't pass on the information in the next request.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi!!
I need to create window service which is a scheduler, and i need to set the scheduling parameters for the service through an asp.net page. is it possible to do the same, i mean set the parameters for the window service through ASP.net
Regards
|
|
|
|
|
|
dear all i want to create a export button in my site by which all the record for the registered user stored in user table will exports into an excel file. how could i do taht help me for the same.
i was created my site in C# language.
With regards
Yogesh Agarwal
|
|
|
|
|
You need to show data's need to be exported on a DataGrid. Say Datagrid1. Set the page response content type to excel. Using HTMLTextWriter to render the grid and write that to response. See the following code
Response.ContentType = "application/vnd.ms-excel";
Response.Charset = "";
this.EnableViewState =false;
System.IO.StringWriter ObjTextWriter= new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter ObjHTMLWriter= new System.Web.UI.HtmlTextWriter(ObjTextWriter);
Datagrid1.RenderControl(ObjHTMLWriter);
Hope this helps
|
|
|
|