|
Thanks for ur replay
exactly what u tell is the correct,
Please help me for this
Thanks
madaka
|
|
|
|
|
Masterpage works as template page where content page can get the look and feel of the masterpage. The same can be attained even in 1.1 by creating an aspx page as a template and derving other aspx pages from this. then what is the use and advantage of using masterpage.
|
|
|
|
|
|
Thank You Mark. It answered my query perfectly.
|
|
|
|
|
I am using StateServer Session but I want to write a code on
Session_End and as Session_End event is not fired for StateServer I am
stuck with some problem.
My problem is if user close the browser without logout then I want to
make some operations and Session_End was one option but as I am using
StateServer that option is of no use. Is there any other option ?
Please help me out.
Waiting for reply.
Ankush...
|
|
|
|
|
I haven't really tried it, but something I would try if I were in your situation is call an Ajax function on the onunload event of the body. I'm not sure but may be this event is fired when the window is closed. You'd need to make some tests.
daniero
|
|
|
|
|
I observed that siteMapNodes without a URL are not rendered on the screen anymore after the securityTrimmingEnabled attribute is set to true. Does anyone know how to create menu items that are not tied to a URL, while the securityTrimmingEnabled attribute is set to True?
|
|
|
|
|
Hi,
I have an existing ASP.NET/C# web application which I would like to replicate for use on another project. The other project will need slight modifications to the existing site, e.g. some different site text, some different logic in code-behind, the odd extra page here and there etc., but 95% of the site will remain the same.
My question is, what is the best practice for sharing code/pages between these two sites? I am using Visual Studio 2005, and cannot see an easy way of sharing .aspx pages, .ascx web controls, etc. between different web projects.
Naturally I don't want to simply create a copy of every page for each site, as this leads to twice the maintenance cost of having all the shared pages in the same place.
Many thanks in advance for any help/advice,
MrCeri
|
|
|
|
|
If you are using VSS, or a similar product, you could share the pages, controls, etc. between the projects.
|
|
|
|
|
Thanks Mark. Yes, I'd considered using source control, I think it could well work.
Another suggestion I have seen is to move the entire code-behind class of each page into a separate class library, and have each page inherit from its equivalent code-behind class in the library.
It still means you have to have copies of each page on each site, but at least now they're reduced to mostly html, all of the code and logic can be shared via the new class library.
Cheers,
Ceri
|
|
|
|
|
If you are using 2.0 you also may also be able to use partial class for some of your common page logic.
|
|
|
|
|
Mark Nischalke wrote: If you are using 2.0 you also may also be able to use partial class for some of your common page logic
True, though I don't think it's possible to use partial classes across projects/assemblies is it? (feel free to correct me if I'm wrong on this)
|
|
|
|
|
You're correct, though it may be a way of partitioning some of the logic.
|
|
|
|
|
<code>string body = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">";
body += "<HTML><HEAD><META http-equiv=Content-Type content=\"text/html; charset=iso-8859-1\">";
body += "</HEAD><BODY><DIV><FONT face=Arial color=#ff0000 size=2>this is some HTML text";
body += "</FONT></DIV></BODY></HTML>";
AlternateView alternate = new AlternateView(body, MediaTypeNames.Text.Html);
message.AlternateViews.Add(alternate);</code>
I'm trying to send an email with html format but I get "illegal character in path error" when I create the alternative object.
I get this code from the .NET Framework Class Library, can somebody help me please? I tried to create an html string myself but the errore is the same.
thanks a lot
-- modified at 9:38 Monday 17th July, 2006
|
|
|
|
|
hi,
I would like to build a Webapplication usin ASP.net through VisualStudio Express.
However my host does not support the .mdf database files.
Basically i have three options:
Set up an ODBC to an Access Database file for free,
or
Order a Fullblown MS SQL-Server 2005 wich (beeing a Student with little money) would cost money id rather not spend.
Finnaly
I could also use a MySQL Database for free, but it does not integrate into the VS IDE at all (as far as i know)
This new site will replace an old one, wich over the course of the last few years got an average of about 850page views per day.
so what should i do?
~Luke
-- modified at 9:15 Monday 17th July, 2006
|
|
|
|
|
You could change to a host with Sql Server or see if yours has an add on.
-- modified at 9:50 Monday 17th July, 2006
|
|
|
|
|
but again they want money for it....
i guess the question is rather:
Could i use Access? If not, how hard is it to work with MySQL
|
|
|
|
|
Why not use SQL 2005 Express? It integrates with the express studios just fine and it doesn't limit you in your programming capabilities. The limitations with SQL 2005 Express are some advanced Database server features, concurrent database access and database size limitation (4GB if I'm not mistaken, I'm certain that on MSDE it was 2GB, but not sure with SQL 2005 Express).
MySql is a good option. I've used it and works great with the .net connector found in www.mysql.com.
MySql is just a bit different compared to MS SQL (Sql queries change a bit), there are some differences in data types, but they all translate fine to .net through the connector.
daniero
|
|
|
|
|
I have asked about SQL2005 Experss, but my host claimed they did not support it
i forgot to mention that the MySQL server avaliable is only version 4.1.19 but ill have a look if i cant find a .net connector anyway..
|
|
|
|
|
the .net connector itself is free for download in www.mysql.com[^]
I've used it witn mysql server versions from 3 to 5 with no problems at all.
daniero
|
|
|
|
|
If i call the Web Service from the same server which i hosted,it's working fine.If i try to call the web service from another server i get the following error.
Unable to generate a temporary class (result=1).
error CS2001: Source file 'C:\WINDOWS\TEMP\39_bmero.0.cs' could not be found.
error CS2008: No inputs specified.
Kindly help me....
Sathiyaraj Ganesan
|
|
|
|
|
I have an DataGrid and a CheckBoxList in EditItemTemplate as shown below:
<asp:TemplateColumn HeaderText="Users">
<ItemTemplate>
<asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.user") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:CheckBoxList runat="server" ID="rolesCBoxL" EnableViewState="true" AppendDataBoundItems="true" RepeatColumns="2" Enabled="true" ></asp:CheckBoxList>
</EditItemTemplate>
</asp:TemplateColumn>
This CheckBoxList is created dynamically in ItemCreated function:
DataView dv = ds.Tables[0].DefaultView;
for (int i = 0; i < dv.Count; i++)
{
ListItem li = new ListItem(dv[i]["name"].ToString(), dv[i]["id"].ToString());
rcbl.Items.Add(li);
}
So, when i click the Edit button everuything seems to be OK.
CheckBoxList is visible and even i have some selected values OK.
But , i have a problem with getting this values in UpdateCommand function.
CheckBoxList rcbl = (CheckBoxList)e.Item.FindControl("rolesCBoxL");
for (int i = 0; i < rcbl.Items.Count; i++)
{
if (rcbl.Items[i].Selected)
{
// some DB queries
}
}
This code returns me nothing. I made a breakpoint and figured out that the
rcbl.Items.Count is zero. I don't know how to manage that. Does anyone knows the answer
for this question ? HOW TO GET VALUES FROM DYNAMICALLY CREATED CHECKBOXLIST IN EDITITEMTEMPLATE IN DATAGRID ? Thank You.
voidtech
|
|
|
|
|
|
I've found solution.
It's pretty starnge for me
but i have moved everything from ItemCreated to ItemDataBound and it works
fine right now.
|
|
|
|
|
and i didn't found it at www.programmingknowledge.com
|
|
|
|