|
rhtbhegade wrote: however my sequence is first.aspx then on button click second.aspx and then navigates to Third.aspx....
As suggesed by others, You can store the data inside Session Variable and can access any where from your application.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
|
hi i want to add stylesheet in my content page.
i written code like this
<br />
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server" ><br />
<link href="../App_Themes/Blue/DefStyles.css" rel="stylesheet" type="text/css" /><br />
</asp:Content><br />
if i switch design window below error is coming
"
Error 40
Cannot switch views: Validation (XHTML 1.0 Transitional):
Element 'link' cannot be nested within element 'td'.
"
how to solve this problem?
|
|
|
|
|
this should be like this
<asp:content id="Content2" contentplaceholderid="ContentPlaceHolder1" runat="Server" >
<="" asp:content="">
|
|
|
|
|
if i write like that this error coming
Error 39 Only Content controls are allowed directly in a content page that contains Content controls.
|
|
|
|
|
Include your css file using ScriptManager
ScriptManager.RegisterClientScriptBlock(this,
typeof(nameOfPageOrControl),
"typeAUniqueScriptNameHere3",
"<link href='" +
ResolveUrl("~") +
"mystyle.css' rel='stylesheet' type='text/css' />",
false);
Remove the <link /> tag from your content PlaceHolder, then, it should work.
|
|
|
|
|
below is the sample content page which consists of style sheet..!
one button and a textbox..!
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<link href="App_Themes/StyleSheet.css" rel="stylesheet" type="text/css" />
Close <asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:Button ID="Button1" runat="server" Text="Button" /> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>Close<asp:Content>
Close<asp:Content>--</asp:Content>
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Friend thnx for ur replay.
Now run time this error coming
Cannot find ContentPlaceHolder 'head' in the master page '../common/MasterPage.master', verify content control's ContentPlaceHolderID attribute in the content page.
|
|
|
|
|
pss.srinivasan wrote: Cannot find ContentPlaceHolder 'head' in the master page '../common/MasterPage.master', verify content control's ContentPlaceHolderID attribute in the content page.
What is the ContentPlaceHolder name in master Page ? You should have to mention the Same name over there.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
After Searchin google i am getting different types of solution..!
Below is one..!
[^]
[^]
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Create a ContentPlaceHolder in the master page between the <head> and </head> tags with the id 'head'
|
|
|
|
|
Hi All,
<br />
<br />
public MySqlDataReader ExecuteReader(String query)<br />
{<br />
MySqlConnection con = new MySqlConnection((connectionString));<br />
<br />
MySqlCommand cmd = new MySqlCommand(query, con);<br />
<br />
con.Open();<br />
<br />
MySqlDataReader reader =cmd.ExecuteReader();<br />
con.Close();<br />
<br />
return reader;<br />
}<br />
<br />
I am returning reader but connction gets close so it become null it is in DAl (Data Access layer) i know it is expected beheviour so how to solve this problem.
thanks and regards,
Amit Patel
|
|
|
|
|
Amit Patel1985 wrote: I am returning reader but connction gets close so it become null
A fairly basic issue, you must keep the connection open while you are using the reader object.
|
|
|
|
|
You need to have active open connection to use DataReader . Use DataSet instead for disconnected approach.
|
|
|
|
|
DataReaders need an open connection to work. Once you close the connection everything is gone. If you want to use reader, pass the connection along with query to your method. Once you are done with using the DataReader in the calling method, close the connection.
You can also use DataSet. But selection depends on what you are doing with the data in your code (It is not that DataSet will not do the job for you. It will).
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
Dear All,
How can I send an email of an HTML page showing the results of inquiries made by the client in the exact format displayed on the web-page. Is there a way to read the HTML and put it as the body of the email...
Thanks alot...
E.E.
|
|
|
|
|
Just create an object of MailMessage and set the html in body property and send the mail with IsBodyHtml = true.
Your problem will be solved.
|
|
|
|
|
|
Dim SB as New StringBuilder()
Dim SW as New StringWriter(SB)
Dim htmlTW as New HtmlTextWriter(SW)
dgPopularFAQs.RenderControl(htmlTW)
Actually I am looking for this, however I did not understand what this code is doing... and why I need htmlwriter besides a stringwriter... but in anycase
I hope Page.render(htmltw) will solve my problem and will attach whole page to SB...
Thanks again
|
|
|
|
|
In my ASP.NET project I have some aspx pages and a webservice(asmx) which get called with ASP.NET AJAX. Now the aspx pages just check for session to get the logged in persons username(for relevant SQL calls) but I had trouble doing the same with my asmx file. I tried a couple different methods after searching but most results are for getting sessions in an ashx file, and the same principals dont work.
So what I did was create a public string in my webservice that, on logging in, the aspx page changed to the users name. But then when I checked username it was always just the last person that had logged in, for obvious reasons.
So how do I check for sessions in an asmx page?
Thanks alot
Strive to be humble enough to take advice, and confident enough to do something about it.
|
|
|
|
|
You need to enable sessions in your webservice..
[WebMethod(EnableSession = true)]
public bool HelloWorld()
{
return true;
}
|
|
|
|
|
|
Hi i want to apply them in content page, where i want to write code.
after register assembly i written code error coming, after content place holder i written there also error coming
where i want to write that code,
<link href="../App_Themes/Blue/DefStyles.css" rel="stylesheet" type="text/css" /> this code where i want to write?
plz replay me.
|
|
|
|
|
I'm not sure I understand. What error ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Sample Code of my Content page
<%@ Page Language="C#" MasterPageFile="~/common/MasterPage.master" AutoEventWireup="true"<br />
CodeFile="AdminSetting.aspx.cs" Inherits="admin_AdminSetting" %><br />
<br />
<%@ Register TagPrefix="igtbl" Namespace="Infragistics.WebUI.UltraWebGrid" Assembly="Infragistics2.WebUI.UltraWebGrid.v7.3, Version=7.3.20073.1043, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" %><br />
<br />
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server" ><br />
<br />
<table border="0" cellpadding="0" cellspacing="0" style="height: 100%" align="left"><br />
<br />
<tr><br />
<td style="height: 10px; width: 903px;" valign="top"><br />
<asp:ScriptManagerProxy id="ScriptManagerProxy1" runat="server"><br />
<scripts><br />
<asp:ScriptReference Path="~/scripts/Admin_grid.js" /><br />
</scripts><br />
</asp:ScriptManagerProxy><br />
</td><br />
<td><br />
</td><br />
</tr><br />
</table><br />
</asp:Content>
in this page where i want to apply them?
<link href="../App_Themes/Blue/DefStyles.css" rel="stylesheet" type="text/css" />
|
|
|
|