|
hi,
we need to read styles from Style Sheet.css file and we need to bind these styles for Drop Down.
Thanks &Regards,
Vishnu.
|
|
|
|
|
Hi Experts..
I need one help from you peoples.
I am having a website where i have some coding in the Global file for the session starting and session end and all..
in the session end i will delete the file "User.xml" which contains required information which i have stored in on local place for rendering the page.
While rendering the page i will check for the file and take the reqd information from there. Its working fine.
I am having one Login Page where i will save the "User.xml" file upon clicking the Login Button.
Issue
What happens is when the session time outs, after clicking the Login Button it is saving the file, but in the session end coding its deleting the same.
so i planned to restart the session so that the session end wont fire.
So can any one says how to restart the session in C# coding?
Thanks in advance
|
|
|
|
|
Page.Session.Abort();
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
hi digimanus,
thanks for your response..
i hope you are talking about the Page.Session.Abandon();
but it will kill the session, how to restart the same?
|
|
|
|
|
Once a session times out, it is gone. Take a lesson from the story of Dr. Frankenstein and let it die in peace. And then name your files with the session ID in the filename to avoid these problems.
|
|
|
|
|
Thanks Mr Gray.. read about what you said.but i don't know is that correct. and thanks again for confirming the same.
|
|
|
|
|
Hi,
Just confirm me that after session_end, why are you firing that Login Button event?. Stop that event to continue the past session which was gone and take a New Session and store the Values in Users.xml file.
I think you got it....
|
|
|
|
|
Hi,
I have three repeaters rep1, rep2, rep3. Code block is like this:
<asp:Repeater runat="server" id="rep1">
<HeaderTemplate><b>Books</b><br /></HeaderTemplate>
<ItemTemplate>
<b><%# DataBinder.Eval(Container.DataItem, "Mathematics") %>
<asp:Repeater id="rep2" runat="server">
<HeaderTemplate>
<asp:Table ID="tblLists" runat="server">
<asp:TableRow>
<asp:TableCell>BookName</asp:TableCell>
<asp:TableCell>Amount</asp:TableCell>
</asp:TableRow>
</asp:Table>
</HeaderTemplate>
<ItemTemplate>
<asp:Table ID="tblListItems" runat="server">
<asp:TableRow>
<asp:TableCell><%# DataBinder.Eval(Container.DataItem, "BookName")%></asp:TableCell>
<asp:TableCell>$<%# DataBinder.Eval(Container.DataItem,"Amount")%></asp:TableCell>
</asp:TableRow>
</asp:Table>
</ItemTemplate>
</asp:Repeater>
<asp:Repeater ID="rep3" runat="server">
<ItemTemplate>
<asp:Table ID="tblTotal" runat="server">
<asp:TableRow>
<asp:TableCell></asp:TableCell>
<asp:TableCell></asp:TableCell>
<asp:TableCell></asp:TableCell>
<asp:TableCell>$<%# DataBinder.Eval(Container.DataItem, "TotalAmount") %></asp:TableCell>
</asp:TableRow>
</asp:Table>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
<FooterTemplate>
</FooterTemplate>
<separatortemplate>
<br /><br /><br />
</separatortemplate>
</asp:Repeater>
I wanted to show something like this:
Books
BookName Amount
Eng Math $25
basic Math $40
Inter Math $60
$125
But it is showing like this:
Books
$
BookName Amount
Eng Math $25
basic Math $40
Inter Math $60
$125
$
$
$
Well, If i take out "$" from the code, display doesn't have any problem but I need to show that and it gives that display problem. I tried to show total amount table of rep3 in headerTemplate but that doesn't sound good. Any ideas on this kind of error ?
suchita
modified on Tuesday, August 3, 2010 8:48 AM
|
|
|
|
|
Ctrl-k Ctrl-d is your friend. Triple nested repeaters without proper indentation is a major pain in the neck to read. I still have no idea what your actual problem is or why you have crazy things like tables with three blank cells in the front of every row. But at least decently formatted code might get you more answers.
<asp:Repeater runat="server" ID="rep1">
<HeaderTemplate>
<b>Books</b><br />
</HeaderTemplate>
<ItemTemplate>
<b>
<%# DataBinder.Eval(Container.DataItem, "Mathematics") %>
<asp:Repeater ID="rep2" runat="server">
<HeaderTemplate>
<asp:Table ID="tblLists" runat="server">
<asp:TableRow>
<asp:TableCell>BookName</asp:TableCell>
<asp:TableCell>Amount</asp:TableCell>
</asp:TableRow>
</asp:Table>
</HeaderTemplate>
<ItemTemplate>
<asp:Table ID="tblListItems" runat="server">
<asp:TableRow>
<asp:TableCell><%# DataBinder.Eval(Container.DataItem, "BookName")%></asp:TableCell>
<asp:TableCell><%# DataBinder.Eval(Container.DataItem,"Amount")%></asp:TableCell>
</asp:TableRow>
</asp:Table>
</ItemTemplate>
</asp:Repeater>
<asp:Repeater ID="rep3" runat="server">
<ItemTemplate>
<asp:Table ID="tblTotal" runat="server">
<asp:TableRow>
<asp:TableCell></asp:TableCell>
<asp:TableCell></asp:TableCell>
<asp:TableCell></asp:TableCell>
<asp:TableCell><%# DataBinder.Eval(Container.DataItem, "TotalAmount") %></asp:TableCell>
</asp:TableRow>
</asp:Table>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
<FooterTemplate>
</FooterTemplate>
<SeparatorTemplate>
<br />
<br />
<br />
</SeparatorTemplate>
</asp:Repeater>
|
|
|
|
|
rep1 is the parent repeater and inside this, there are two child repeaters rep2 and rep3. i used rep2 to show the information of the items along with its amount. I used rep3 to show the total amount of the items.
code is still look like this:
<asp:Repeater runat="server" id="rep1">
<HeaderTemplate><b>Books</b><br /></HeaderTemplate>
<ItemTemplate>
<b><%# DataBinder.Eval(Container.DataItem, "Mathematics") %>
<asp:Repeater id="rep2" runat="server">
<HeaderTemplate>
<asp:Table ID="tblLists" runat="server">
<asp:TableRow>
<asp:TableCell>BookName</asp:TableCell>
<asp:TableCell>Amount</asp:TableCell>
</asp:TableRow>
</asp:Table>
</HeaderTemplate>
<ItemTemplate>
<asp:Table ID="tblListItems" runat="server">
<asp:TableRow>
<asp:TableCell><%# DataBinder.Eval(Container.DataItem, "BookName")%></asp:TableCell>
<asp:TableCell>$<%# DataBinder.Eval(Container.DataItem,"Amount")%></asp:TableCell>
</asp:TableRow>
</asp:Table>
</ItemTemplate>
</asp:Repeater>
<asp:Repeater ID="rep3" runat="server">
<ItemTemplate>
<asp:Table ID="tblTotal" runat="server">
<asp:TableRow>
<asp:TableCell></asp:TableCell>
<asp:TableCell></asp:TableCell>
<asp:TableCell></asp:TableCell>
<asp:TableCell>$<%# DataBinder.Eval(Container.DataItem, "TotalAmount") %></asp:TableCell>
</asp:TableRow>
</asp:Table>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
<FooterTemplate>
</FooterTemplate>
<separatortemplate>
<br /><br /><br />
</separatortemplate>
</asp:Repeater>
I wanted to show something like this:
Books
BookName Amount
Eng Math $25
basic Math $40
Inter Math $60
$125
But it is showing like this:
Books
$
BookName Amount
Eng Math $25
basic Math $40
Inter Math $60
$125
$
$
$
Well, If i take out "$" from the code, display doesn't have any problem but I need to show that "$" sign before the amount and it gives that display problem. I tried to show total amount table of rep3 in its headerTemplate but that doesn't sound good. Any ideas on this kind of error ?
suchita
|
|
|
|
|
Yes your code still looks like that. And that is a bad thing. Lack of proper indentation makes it hard to read. And you still have extra table cells for no reason. I don't know where the dollar signs are coming from since they aren't in your code. If you need to format something as currency don't just slap a dollar sign in there, use a formatString. Another thing, since you aren't doing any real manipulation of the table rows or cells you don't need the server side control versions of the table elements. You can use just the regular HTML tags. If the problem is with the dollar signs, then show us the code with the dollar signs. Showing us the code that doesn't have the problem is pointless. Throw out what you have and restart with what is below.
<asp:Repeater runat="server" ID="rep1">
<HeaderTemplate>
<b>Books</b><br />
</HeaderTemplate>
<ItemTemplate>
<b>
<%# DataBinder.Eval(Container.DataItem, "Mathematics") %>
<asp:Repeater ID="rep2" runat="server">
<HeaderTemplate>
<table id="tblLists">
<tr>
<td>Book Name</td>
<td>Amount</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table id="tblListItems">
<tr>
<td><%# DataBinder.Eval(Container.DataItem, "BookName")%></td>
<td>$<%# DataBinder.Eval(Container.DataItem,"Amount")%></td>
</tr>
</table>
</ItemTemplate>
</asp:Repeater>
<asp:Repeater ID="rep3" runat="server">
<ItemTemplate>
<table id="tblTotal">
<tr>
<td>$<%# DataBinder.Eval(Container.DataItem, "TotalAmount") %></td>
</tr>
</table>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
<FooterTemplate>
</FooterTemplate>
<SeparatorTemplate>
<br />
<br />
<br />
</SeparatorTemplate>
</asp:Repeater>
|
|
|
|
|
<asp:Repeater runat="server" id="rep1">
<HeaderTemplate><b>Books</b><br /></HeaderTemplate>
<ItemTemplate>
<b><%# DataBinder.Eval(Container.DataItem, "Mathematics") %>
<asp:Repeater id="rep2" runat="server">
<HeaderTemplate>
<asp:Table ID="tblLists" runat="server">
<asp:TableRow>
<asp:TableCell>BookName</asp:TableCell>
<asp:TableCell>Amount</asp:TableCell>
</asp:TableRow>
</asp:Table>
</HeaderTemplate>
<ItemTemplate>
<asp:Table ID="tblListItems" runat="server">
<asp:TableRow>
<asp:TableCell><%# DataBinder.Eval(Container.DataItem, "BookName")%></asp:TableCell>
<asp:TableCell>$<%# DataBinder.Eval(Container.DataItem,"Amount")%></asp:TableCell>
</asp:TableRow>
</asp:Table>
</ItemTemplate>
</asp:Repeater>
<asp:Repeater ID="rep3" runat="server">
<ItemTemplate>
<asp:Table ID="tblTotal" runat="server">
<asp:TableRow>
<asp:TableCell></asp:TableCell>
<asp:TableCell></asp:TableCell>
<asp:TableCell></asp:TableCell>
<asp:TableCell>$<%# DataBinder.Eval(Container.DataItem, "TotalAmount") %></asp:TableCell>
</asp:TableRow>
</asp:Table>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
<FooterTemplate>
</FooterTemplate>
<separatortemplate>
<br /><br /><br />
</separatortemplate>
</asp:Repeater>
Lines
<asp:TableCell>$<%# DataBinder.Eval(Container.DataItem,"Amount")%></asp:TableCell>
and
<asp:TableCell>$<%# DataBinder.Eval(Container.DataItem, "TotalAmount") %></asp:TableCell>
have the $ signs. Its the same code that i posted up.
thanks
suchita
|
|
|
|
|
Read the documentation[^] to find out how to format databound items. I am too frustrated with your refusal to use good formatting despite being given both formatted code and keystrokes to format it yourself to provide any further help on this topic.
|
|
|
|
|
Thank you Gray.
<asp:TableCell><%# DataBinder.Eval(Container.DataItem,"Amount","{0:c}") %></asp:TableCell>
this one worked out. Well I didnt know we can format the string in ascx page. now its working. thanks a lot.
suchita
|
|
|
|
|
FindAndReplace method applied for Word 2007 in C#.net Windows Application not running in Windows Server 2003
It is giving me problem at below mentioned point
_aDoc.Content.Find.Replacement.ClearFormatting();
Please suggest me the Requirement for the same.
Any Help.Its urgent
Thanks,
Harish Devadiga
|
|
|
|
|
Hai,
I have a girdview in an aspx page and if I click the EDIT button inside that gridview, it will open a particular page in an iframe. How can I get the values of the textboxes inside that page that already in an iframe from the main page that the grid is placed.
If anyone can help me please help me
|
|
|
|
|
|
Is there any reason you are doing screen scraping rather than getting the data behind the scenes? This sounds very phishy. Make sure you aren't violating the terms of use of whatever site you are bringing up in the iframe.
|
|
|
|
|
You can pass the textbox values in querystring in the IFrame or you can use
window.parent.document.getElementById("textboxID").value
|
|
|
|
|
Hi All ,
i hope every one has seen google calender to schedule appointment.
i want same thing in my web application i can buy this calender from Telerik and other provider.
but is it possible to make it free by using Google Api i have already tried googling it but with no result
can u guys provide me sample if u have done this befoe.
regards,
Amit
|
|
|
|
|
hi mates,
is it possible to have a calendar popup in a showmodaldialog?
i have tried the code but doesn't work. it will not fire the calendar button to show the calendar.
i call the showdialog.aspx in when i click a button in my parent.aspx
parent.aspx
<script type="text/javascript" language="JavaScript">
function ShowPopup(){
window.showModalDialog("~/page/showdialog.aspx", "Dialog",
"dialogWidth:100px;dialogHeight:130px;");
}
</script>
<asp:Button ID="btnPrint" TabIndex="23" runat="server" CssClass="Button" Width="100px"
Text="Print" OnClientClick="ShowPopup" > </asp:Button>
showdialog.aspx
<asp:TextBox ID="txtReportDate" runat="server" Width="67px">2010/07/20</asp:TextBox>
<img src="../images/SmallCalendar.gif" border="0"></td>
<td style="width: 48px"><a href="javascript:;" onclick="window.open('calendar.aspx?textbox=txtReportDate','cal','width=220,height=200,left=760,top=180')">
note: the calendar is working if it is not in a showmodaldialog.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
|
Why are you opening an intermediate page instead of just opening the calendar page in your modal call? I think your problem is that when you open the modal it isn't a window, its a dialog. So calls to things like window.open don't apply.
|
|
|
|
|
@Keith Barrow thanks but i didn't use ajax thing.
old school coding. hehehe..
@T M Gray
got it, i replace window.open from window.showmodaldialog.
thank you.
another thing, why is it my treeview not keeping the state when i navigate to another page. i search to google and i have this site
http://forums.asp.net/t/1022893.aspx[^]
but the problem is still wont keep the treeview. i dont use datasource but i use nodes.
<Nodes>
<asp:TreeNode Text="Main Menu" Value="MainMenu">
<asp:TreeNode Text="Analysis Order" Value="AnalysisOrder">
<asp:TreeNode Text="New Analysis" NavigateUrl ="~/page/FrmBunsekiOrder.aspx" Value="NewOrder">
</asp:TreeNode>
<asp:TreeNode Text="Analysis" NavigateUrl ="~/page/FrmBunsekiOrderSentaku.aspx" Value="ModOrder">
</asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode Text="Certificate" NavigateUrl ="~/page/FrmSuishituShumeisho.aspx" Value="Certificate">
</asp:TreeNode>
<asp:TreeNode Text="Laboratory" NavigateUrl ="~/page/FrmBunsekiSearch.aspx" Value="LAS">
</asp:TreeNode>
</asp:TreeNode>
</Nodes>
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
i wanna implement a webservice dat will syncronise wit my gmail and also with my yahoo acount. pls caould any1help mewit the source codes
|
|
|
|