|
In that case convert the table to have just one field DateSelected instead of DateStart and DateEnd. Looks like you will end up with a lot of rows.
The custom control I was talking about, had the same requirement as yours, I needed to have the user select individual dates, since the no of rows I had to deal with was less than 50, I had put each row in the database.
The other alternative you may want to do is to put all the dates into an XML string and store that in the database. The XML string can be read into a dataset and you could iterate through each row of the dataset and apply the style.
tblProperty
(
PropertyID,
Description,
ContactName,
PhoneNo,
PropertyDatesXML
) For loading the dates, you can do something like this in the custom control
foreach(DataRow dr in dsPropertyDatesXML.Tables[0].Rows)
{
} To add individual dates into the database, overide the OnSelectionChanged() of the control and store them in an arraylist/list and when your storing it into the database, create the XML string from the list and store it into the database..
I am not sure about the performance. I guess you will get some more ideas from rest of the people and you could combine the ideas to accomplish what your looking for.
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
There are two kinds of people, those who do the work and those who take the credit. Try to be in the first group; there is less competition there. - Indira Gandhi
|
|
|
|
|
Thanks again for your help!
|
|
|
|
|
I'm working in a web application in ASP.NET (c#), and time ago I discovered that I can open with browser pages with the incorrect url, with the only condition that the page name is right.
To give you a practical explanation:
/Admin/
File1.aspx
/FrontEnd/
File2.aspx
/Login.aspx
All these queries give me results:
//localhost/project/Admin/File4.aspx
//localhost/project/FrontEnd/File1.aspx
//localhost/project/Admin/Login.aspx
//localhost/project/FrontEnd/Login.aspx
When I open "//localhost/project/Admin/Login.aspx" or "//localhost/project/FrontEnd/Login.aspx" CSS and images are not loaded, but "//localhost/project/Admin/File4.aspx" or "//localhost/project/FrontEnd/File1.aspx" they are. Even if i put anything instead of "/Admin/" or "/FrontEnd/" it displays the page you request.
It's strange for me, this sounds to me like Mod_Rewrite (URLRewrite) but i never used this in this project.
Any ideas?
Francisco
-- modified at 13:31 Tuesday 31st July, 2007
|
|
|
|
|
in the click event of a ImageMap control I need to know the x y position of the click relating to the Image(not the window)... Any know of a way?
|
|
|
|
|
Can any one give me code of converting HTML page to PDF in ASP.NET.
Thanks in Advance.
|
|
|
|
|
Hi Reader(s), I'm relatively new to ASP.NET so be gentle with me please!
I have a website - written in ASP.Net - the client has just asked if I could provide a password protected home page so they can control the access initially - they want to use one account. I already have a login (for a CMS) on the home page for users to access their particular data records so I am wary of any potential issues. Can anyone help with providing a possible solution? Thanks.
Thanks in anticipation. I-S
|
|
|
|
|
|
Hi,
In my application I am having two parts one is user part and second one is Admin part.
In user part I am using so many controls like Panel, Wizard, Gridview, Textboxes, Labels.. to enter data. In my Admin part I am using the same screens that user used to enter data. In Admin part I am showing the enter data to him to approve.
So same screens are used in both user and Admin. So I want to develop one User control with all the above controls in user screen and want to use the User Control in the Admin part.
In User Control I am putting so many checkboxes buttons . How to handle those button events in the aspx application which is using the user control.
Thanks
|
|
|
|
|
Is it correct to read from web.config file in the following way? i am using asp.net 2.0 VS 2005.I get the following error
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
anmar.SharpWebMail.UI.Login.Login_Click(Object sender, EventArgs args) in login.cs:75
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
The point where the error is shown is
int login_mode = (int)Application["sharpwebmail/login/mode"];
Are application variables available in asp.net 2.0
|
|
|
|
|
sankar.K wrote: Are application variables available in asp.net 2.0
Yes, but set them in global.asax, not web.config
|
|
|
|
|
Consider i have a web.config like this
<configuration>
<configsections>
<sharpwebmail>
<general
default_lang="en"
="" title="[general title] configuration setting">
<login
title="[login title] configuration setting"
="" mode="1" append="" serverselection="auto" enablequerystringlogin="false">
How do i get the value of mode in login section in my code?
|
|
|
|
|
I think you can use something aliong the lines of
ConfigurationSettings.SectionName("KeyName")
Try googling "asp.net 2.0 web.config reading" or some such...
|
|
|
|
|
I want to close my page and open another url outside of my local pages.
example
page1.aspx(close)
www.google.com(open)
when i use the server.Transfer it wont do it?
Thanks in advance.
|
|
|
|
|
you can't server.transfer to a file outside of your web app
brsecu wrote: I want to close my page and open another url outside of my local pages.
?? ...just link to it...
|
|
|
|
|
Yes but how. I know it seems like a simple question but I want to do it out of the aspx.cs code not html. How do i link to it.
|
|
|
|
|
Response.Redirect("http://www.google.com");
for example... is that what you want?
|
|
|
|
|
|
Hi,
after registering the user, I ask him to confirm his membership, and after he confirm I use this code to approve him (before he couldn't enter the site):
<br />
MembershipUser User = Membership.GetUser(username);<br />
User.IsApproved = true;
but unfortunately, it doesn't approves him, it changes its value only during the debugging.
Does anybody now, why?
Thank you
|
|
|
|
|
You have a local variable called User that you changed. That doesn't affect the membership database. You need to save the user after you have changed the property to true.
Hope that helps.
Ben
|
|
|
|
|
Thank you,
could you tell me how to do that?
|
|
|
|
|
System.Web.Security.Membership.UpdateUser(User)
Ben
|
|
|
|
|
I've seem any web sites where the pages (.aspx) is in a directory and the code behind (.aspx.cs) is in other directory. Then, there are .dll named with the project name . For me, this structure of directory seems hide code behind and too seems to be strongly secure. I'm worth? Then, how it work? I don't know how to create a web site so. I've created my web sites with .aspx and .aspx.cs together, i.e., in the same directory.
Thanks in advance.
Clucster
|
|
|
|
|
I'm not sure if this is what you're on about, but it sounds like precompilation is at work. Here is a link:
http://www.odetocode.com/Articles/417.aspx[^]
"It was the day before today.... I remember it like it was yesterday."
-Moleman
|
|
|
|
|
Thanks so much. It's really it.
Clucster
|
|
|
|
|
You're welcome.
"It was the day before today.... I remember it like it was yesterday."
-Moleman
|
|
|
|