|
<pre/> tags are better for code listings. For instance:
<asp:Repeater ID="repDetails" runat="server" OnItemDataBound="repDetails_ItemDataBound">
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
ID: <asp:Label ID="lblDetailsFiles" runat="server" Text='<%# Eval("errorCyklusId") %>'></asp:Label>
<asp:Repeater ID="repFiles" runat="server">
<ItemTemplate> <asp:HyperLink ID="lnkFile" runat="server" Text='<%# Eval("fileName") %>' Target="_blank" NavigateUrl=""></asp:HyperLink>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:Repeater>
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Yes I understood you.
I hope you can help me with my problem instead.......
I cann't figure out, how I get the rows "signature", so I can call the database again for selecting to the nested repeater. And how I can change the NavigateURL for each row in the nested repeater?
My code:
<asp:repeater id="repDetails" runat="server" onitemdatabound="repDetails_ItemDataBound">
<headertemplate>
</headertemplate>
<itemtemplate>
ID: <asp:label id="lblDetailsFiles" runat="server" text=""><![CDATA[<%# Eval("errorCyklusId") %>]]>'></asp:label>
<asp:repeater id="repFiles" runat="server">
<itemtemplate>
<asp:hyperlink id="lnkFile" runat="server" text=""><![CDATA[<%# Eval("fileName") %>]]>' Target="_blank" NavigateUrl=""></asp:hyperlink>
</itemtemplate>
</asp:repeater>
</itemtemplate>
<footertemplate>
</footertemplate>
</asp:repeater>
1 protected void repDetails_ItemDataBound(object sender, RepeaterItemEventArgs e)
2 {
3
4
5 if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
6 {
7 try
8 {
9 ERSError error = new ERSError();
10
11 DataTable filelist = null;
12
13 if (error.GetFileList(1, ref filelist) == Status.Success)
14 {
15 int companyid = Convert.ToInt32(Session[ERSConnect.CookieCompanyId]);
16
17 RepeaterItem item = e.Item;
18 Repeater repFiles = item.FindControl("repFiles") as Repeater;
19 repFiles.DataSource = filelist.DefaultView;
20 repFiles.DataBind();
21 }
22 }
23 catch
24 { }
25 }
26 }
Kind regards,
simsen
Kind regards,
simsen
|
|
|
|
|
I mean if I wanted to add a new user or manage my users, can I do that on the server that I deployed my webapplication on...if yes how??
|
|
|
|
|
The website administration tool requires Visual Studio 2005 (or later) to be installed. You can use the ASP.NET Configuration Tool in IIS to configure your application in a production environment.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
hi everyone.
I have used session and cookie for login users with ASP.NET 1.1
and wrote:
<br />
Dim c As New HttpCookie("username")<br />
c.Value = r("company")<br />
c.Expires = Now.AddMinutes(30)<br />
Response.Cookies.Add(c)<br />
Response.Redirect("Main.aspx")<br />
r is an objects of SqlDataReader class. however when the user login an go to the main page on there I'v used a linkbutton as a logout order. and the code there is:
<br />
Request.Cookies.Remove("username")<br />
Request.Cookies("username").Expires = Now<br />
Response.Redirect("Login.aspx")<br />
and on the load event of login page:
<br />
If Request.Cookies("username") Is Nothing = False Then<br />
Session("user") = Request.Cookies("username").Value.ToString<br />
Response.Redirect("Main.aspx")<br />
Else<br />
Session("user") = Nothing<br />
End If<br />
but it dosen't works! and
Request.Cookies("username") Is Nothing = True !!!
Do I wrote the correct code or not ?
if exists another way plz help.
thanks
|
|
|
|
|
masoodp666 wrote: but it dosen't works! and
Request.Cookies("username") Is Nothing = True !!!
This is correct, isn't it? When the user logs out, you delete the cookie and redirect to the Login page. When the Login page loads, you check for the presence of the cookie. If the cookie has been removed, any attempt to refer to the cookie will return a null reference.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
oh excuse me !!!
I said
<br />
If Request.Cookies("username") Is Nothing = False<br />
when I'v deleted the cookie, Request.Cookies("username") Is Nothing MUST BE True, not False! and execute go to Else command.
modified on Monday, February 11, 2008 5:40 AM
|
|
|
|
|
I got it finally !!!
replace:
<br />
Request.Cookies.Remove("username")<br />
Request.Cookies("username").Expires = Now<br />
Response.Redirect("Login.aspx")<br />
With this:
<br />
Response.Cookies("username").Expires = Now<br />
Response.Redirect("Login.aspx")<br />
|
|
|
|
|
how to get file from internet by using the webclient
Dim Client As New WebClient()
Client.DownloadFile("http://www.yahoo.com", "D:\abc\yahoo.html")
when i run this code i am getting out put yahoo.html page when i run this code local host
if i host in remote server i want to download the same page in D:\ or any other directory what i need to give the path.
i getting exception when i run the same code in server.
i am getting out put successfully , when i run local host , pleasee any one can give me solution for this, i want to download file in my local phisical directoy, when i host my dotnet application in remote system.
This is haneef.............................................................
|
|
|
|
|
Wow, you have you posted your message on every forum? Did you think this would increase the chances of your question being answered?
Wrong - double posting only serves to annoy people and results in your message being ignored. Read the foum guidelines and think before you post again.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Do NOT post the same question in multiple forums. Doing so is considered very rude around here and on other sites as well. And, as you've found out, it doesn't get your question answered any faster.
|
|
|
|
|
I've built a product list which I want to extend with some images. I have only 1 table and 1 dataset and i'm showing the products in a gridview. You can watch it @ http://www.rapengaarmaken.nl/.
Users with a administrator role can insert new products. I want to make it possible to upload a image with each product. The gridview should only let me see a thumnail. When I click on the thumbnail the image will be opened in a new window.
I already added a column "image" in my products table. Also I've already set the datatype to image. Did that means the picture will be uploaded into the database? I want him to upload the images to a specific folder in my root.
Can somebody tell me how I can add this image functionality?
|
|
|
|
|
I have uploaded a page on the server.when i am viewing it online,it gives me server error with a following error.
Server Error in '/xxxx' Application
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customerrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customerrors> tag should then have its "mode" attribute set to "Off".
<configuration>
<system.web>
<customerrors mode="Off">
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customerrors> configuration tag to point to a custom error page URL.
<configuration>
<system.web>
<customerrors mode="RemoteOnly">
coolsatty
|
|
|
|
|
From your web.config, disable customerrors to get details of the actual error.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
still i am getting the same error
coolsatty
|
|
|
|
|
Then you're doing something wrong. Set customErrors to 'Off'.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
hey all,
i am using content pages into master page,these pages needs to be validated through javascript,does it possible to inject javascript file into master page and use all of the functions in content pages.
please help me.
|
|
|
|
|
|
Hi,
I got the following error when I was doing some tests on the treeview control. I have a site that consists of a default.aspx that is divided into frames. In my left frame I have a menu in the form of a TreeView. The TreeView has the web.SiteMap as datasource. When running the website and clicking the '+' or '-' to expand or collapse the tree I get the following error in firebug: "TreeView_Toggle node is not defined" and IE6s script debugger popups with the following message: "'TreeView1_data' is undefined".
If I remove all the frames and put the treeview in default.aspx it will work so it is really confusing. I don't think I will use frames in the future but I do want to know why I get this error to better understand the framework.
Thanks,
--Tomas
|
|
|
|
|
I found a way to make it work but I still don't why it didn't work to start with. The problem was the <base target="MainFrame" /> that I had in the head on my aspx-page. If I removed that tag and instead used the Target property of the TreeViewe control it worked just fine.
Does anyone know why it doesn't work with the base tag in the head of the page?
--Tomas
|
|
|
|
|
Put ypur treeview into another aspx page, and create a iframe to refer the page, it will work.
and so intereting that, you can have this test. still leave your treeview on the page. say: tree1 in the main page, tree2 in another page which is refered by the iframe, click on the tree1. check tree2.
nodes of tree2 will expand by clicking on tree1.
|
|
|
|
|
to retrieve text from the uml class diagam and to estimate the size
|
|
|
|
|
Ok...? What part of writing this code are you having problems with? Post your code, and show us where the problem is.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
Hi!
1)I am very confused to get the concept of MVC (Model View Control).Could u tell me what is
this MVC Model is all about?
2 ) How to implements MVC Model to the apiaction? could u tell me the steps.
|
|
|
|
|
is Google[^] not working where you live? Any one of those links will tell you what you need to know.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|