|
how to bind data in asp.net repeater
fd
|
|
|
|
|
you have to use the eval() or databind method for binding data
with repeater control. it is simple as you bind data with grid.
if you don't know refer msdn for more or ebook of asp.net
Refards
Keyur Satyadev
|
|
|
|
|
Hello,
I have below scenario.
I have a web service hosted on Windows machine. This web service executes a VB6 exe file. The VB exe file may take up to 30 mins of execution.
This web service on Windows system is consumed from PHP.
My ultimate aim is to execute the VB exe file on windows machine.
Is this a correct approch? And this Windows machine only accpets web requests.
Please advice.
Regards,
Pavas
|
|
|
|
|
Hi All,
I am working on a project in which I need to get YouTube videos into my application folder through code i.e., when i select an video in YouTube it should be downloaded and saved into my default folder which I have already created. If anyone who have any idea how to solve this or code(Asp.net) for this please reply me. Its very urgent. Please reply me soon.
Thank you.
|
|
|
|
|
|
Hello Everybody
I bought some SSL secure web space.
When i click login button from http://www.mywebsite.co.uk
it goes to https://secured-url.com/myfolder.login.aspx
but every single time the following message is coming:
This page contains secure and non secure items, do u want to open non secure items?
I dont want to show any message.
Please give me some instructions
Thanks
Sarfaraj
Sarfarj Ahmed
|
|
|
|
|
You have a link to a non-HTTPS item on your site, like an , , or CSS file that is served via regular HTTP. To make this message go away you'll have to make sure those files are also served via HTTPS.
|
|
|
|
|
Hi
I have placed objects Button and 12 objects Panel on an UpdatePanel.
When i click on a button, a panel appears (on the event OnClik, the precedent panel become invisible, and the new panel become visible)
Despite the object ScriptManager and UpdatePanel, when i click on the button, all the screen refresh. Is it normal ?
It has seemed to me that with Ajax, the screen does not refresh !
Thank you for advance
Here are the sources.
GestionAgenda.aspx :
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GestionAgenda2.aspx.cs" Inherits="GestionAgenda" StyleSheetTheme="Thème1" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<%@ Register assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI" tagprefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Page sans titre</title>
<style type="text/css">
.style26
{
color: #0066FF;
font-weight: bold;
height: 23px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div style="width: 731px; height: 49px">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<br />
<br />
<br />
<br />
<br />
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<p class="style26">
<asp:Button ID="Bn01" runat="server" onclick="Bn01_Click" Text="Janvier" />
<asp:Button ID="Bn02" runat="server" onclick="Bn01_Click" Text="Février" />
<asp:Button ID="Bn03" runat="server" onclick="Bn01_Click" Text="Mars" />
<asp:Button ID="Bn04" runat="server" onclick="Bn01_Click" Text="Avril" />
<asp:Button ID="Bn05" runat="server" onclick="Bn01_Click" Text="Mai" />
<asp:Button ID="Bn06" runat="server" onclick="Bn01_Click" Text="Juin" />
<asp:Button ID="Bn07" runat="server" onclick="Bn01_Click" Text="Juillet" />
<asp:Button ID="Bn08" runat="server" onclick="Bn01_Click" Text="Août" />
<asp:Button ID="Bn09" runat="server" onclick="Bn01_Click" Text="Septembre" />
<asp:Button ID="Bn10" runat="server" onclick="Bn01_Click" Text="Octobre" />
<asp:Button ID="Bn11" runat="server" onclick="Bn01_Click" Text="Novembre" />
<asp:Button ID="Bn12" runat="server" onclick="Bn01_Click" Text="Decembre" />
</p>
<asp:Panel ID="Panel1" runat="server" BackColor="Lime" Height="125px">
<asp:CheckBoxList ID="CheckBoxList1" runat="server" Height="97px" Width="200px">
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
</asp:CheckBoxList>
</asp:Panel>
<asp:Panel ID="Panel2" runat="server" BackColor="Yellow" Height="125px" Visible="False">
<asp:CheckBoxList ID="CheckBoxList2" runat="server"
Height="97px" Width="200px">
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
</asp:CheckBoxList>
</asp:Panel>
<asp:Panel ID="Panel3" runat="server" BackColor="Blue" Height="125px"
Width="694px" Visible="False">
<asp:CheckBoxList ID="CheckBoxList3" runat="server"
Height="97px" Width="200px">
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
</asp:CheckBoxList>
</asp:Panel>
<asp:Panel ID="Panel4" runat="server" BackColor="Lime" Height="125px"
Width="694px" Visible="False">
<asp:CheckBoxList ID="CheckBoxList4" runat="server" Height="97px" Width="200px">
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
</asp:CheckBoxList>
</asp:Panel>
<asp:Panel ID="Panel5" runat="server" BackColor="Yellow" Height="125px"
Width="694px" Visible="False">
<asp:CheckBoxList ID="CheckBoxList5" runat="server"
Height="97px" Width="200px">
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
</asp:CheckBoxList>
</asp:Panel>
<asp:Panel ID="Panel6" runat="server" BackColor="Blue" Height="125px"
Width="692px" Visible="False">
<asp:CheckBoxList ID="CheckBoxList6" runat="server"
Height="97px" Width="200px">
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
</asp:CheckBoxList>
</asp:Panel>
<asp:Panel ID="Panel7" runat="server" BackColor="Lime" Height="125px"
Width="694px" Visible="False">
<asp:CheckBoxList ID="CheckBoxList7" runat="server" Height="97px" Width="200px">
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
</asp:CheckBoxList>
</asp:Panel>
<asp:Panel ID="Panel8" runat="server" BackColor="Yellow" Height="125px"
Width="694px" Visible="False">
<asp:CheckBoxList ID="CheckBoxList8" runat="server"
Height="97px" Width="200px">
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
</asp:CheckBoxList>
</asp:Panel>
<asp:Panel ID="Panel9" runat="server" BackColor="Blue" Height="125px"
Width="694px" Visible="False">
<asp:CheckBoxList ID="CheckBoxList9" runat="server"
Height="97px" Width="200px">
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
</asp:CheckBoxList>
</asp:Panel>
<asp:Panel ID="Panel10" runat="server" BackColor="Lime" Height="125px"
Width="694px" Visible="False">
<asp:CheckBoxList ID="CheckBoxList10" runat="server" Height="97px" Width="200px">
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
</asp:CheckBoxList>
</asp:Panel>
<asp:Panel ID="Panel11" runat="server" BackColor="Yellow" Height="125px"
Width="694px" Visible="False">
<asp:CheckBoxList ID="CheckBoxList11" runat="server"
Height="97px" Width="200px">
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
</asp:CheckBoxList>
</asp:Panel>
<asp:Panel ID="Panel12" runat="server" BackColor="Blue" Height="125px"
Width="694px" Visible="False">
<asp:CheckBoxList ID="CheckBoxList12" runat="server"
Height="97px" Width="200px">
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
</asp:CheckBoxList>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<p class="style26">Choix des périodes</p>
<p class="style26"> </p>
<p class="style26"> </p>
</form>
</body>
</html>
GestionAgenda.cs :
using System;
using System.Windows.Forms;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
public partial class GestionAgenda : System.Web.UI.Page
{
protected void Bn01_Click(object sender, EventArgs e)
{
Panel1.Visible = false;
Panel2.Visible = false;
Panel3.Visible = false;
Panel4.Visible = false;
Panel5.Visible = false;
Panel6.Visible = false;
Panel7.Visible = false;
Panel8.Visible = false;
Panel9.Visible = false;
Panel10.Visible = false;
Panel11.Visible = false;
Panel12.Visible = false;
string chaine_numbtn = ((System.Web.UI.WebControls.Button)sender).ID.Substring(2, 2);
int numbtn = Convert.ToInt32(chaine_numbtn);
System.Web.UI.WebControls.Panel LePanel = (System.Web.UI.WebControls.Panel)FindControl("Panel" + numbtn.ToString());
LePanel.Visible = true;
}
}
|
|
|
|
|
if the agenda is to hide and show panels then why are you using ajax and update panels along with server side code.
you can use simple javascript to acomplish this task.
and your page will be get refresh.....
umerumerumer
|
|
|
|
|
Hi,
Ok but how can you do that ?
Can you show me an example of code ?
Thank you for advance
|
|
|
|
|
you have to set the conditional mode(properties) of update panel to conditional so only
update panel can be updated. entire page can not be updated.
|
|
|
|
|
Hi,
I have set the properties UpdateMode to Conditinal but all the screen refresh too
|
|
|
|
|
create a javascript function pass it panel name
use following code in it.
document.getElementById(panelid).style.display = "inline"; -> to show panel
document.getElementById(panelid).style.display = "none"; -> to hide.
umerumerumer
|
|
|
|
|
Yes...it's very interesting but my knowledge are very limited so
please can you continue your explication ?
the button and panel lines describe in the aspx file are :
<asp:button id="Bn01" runat="server" text="Février" xmlns:asp="#unknown">
<asp:panel id="Panel1" runat="server" backcolor="Lime" height="125px" xmlns:asp="#unknown">
What do i place in the OnClick="..." ?
what will look like the javascript code ?
Thank you for advance
|
|
|
|
|
you have to use the update panel in place of panel as per your code
and set mode to conditional of each update panel.
so take the update panel instead panel.
Regards
Keyur Satyadev
|
|
|
|
|
Hi
This is ArunVijay, i am using Telerik Rad Grid Control to Display data, have button names as Export To Excel.
when i click the Button it opens a Open Dailag Box to open my Content into Excel File, when this event triggers during the PostBack session values gets cleared.
How to overcome this problem, this scenario occurs only when i click the Export To Excel Button and tigger Open Dialog Box.
Below is Piece of Code To Export Into Excel.
protected void btnExportExcel_Click(object sender, EventArgs e)
{
excelExport();
dgSampleAnalysis.MasterTableView.ExportToExcel();
}
public void excelExport()
{
dgSampleAnalysis.ExportSettings.ExportOnlyData = true;
}
ArunVijay
|
|
|
|
|
Hi,
I am a new user of iTextSharp(Ver 4.1.2). I am using this dll with ASP.NET 2.0. I am able to convert a text file to PDF and also able to password protect it. Now I am trying to implement signing the converted PDF using a "security certificate"(a digital security file=x.509 V3 type).
I don't know where to start and how to proceed. Has any 1 done this before?? Please help me in getting the converted PDF signed with "security certificate". Sample code Or URL link would be much helpful.
Thanks,
DKDOTNET.
|
|
|
|
|
Hello,
my web-application must run with requireSSL="true" on the web-server. But within my local environment, I use requireSSL="false". Is there a way I can switch this on and off dynamically come deployment? "If (! System.Environemnt.MachinName.Equals("MyLocalMachine")) { ... ?
Hope to hear from you,
many thanks,
Morten
|
|
|
|
|
Hi,
I am trying to use TextReader and TextWriter to Read and Write some text files from business layer. But it is throwing permission error.
Any idea how to overcome this.
Any suggession to achieve this will do good for me.
Thanks.
|
|
|
|
|
Hi,
i would guess that the ASP.NET process (ASPNET or NETWORKSERVICE, depending on IIS version) has not the rights to access the files. If this is the problem you have to give access rights to this user.
Could you post the error message?
Regards
Sebastian
|
|
|
|
|
SeMartens wrote: i would guess that the ASP.NET process (ASPNET or NETWORKSERVICE, depending on IIS version) has not the rights to access the files. If this is the problem you have to give access rights to this user.
I think you are correct. He has to give the access right to that folder or need to change IIS Application Pool Identity of Local System .
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
I actually want to give file IO permission to a particular DLL only. i.e. my business layer Class Library. Any other dll im using in my project should not have access to read or write files on the server.
|
|
|
|
|
Anurag Gandhi wrote: I actually want to give file IO permission to a particular DLL only
Its not the code that is executing that you grant permissions to, its the USER that has the permissions, so its not possible (unless you start playing with impersonation I guess?)
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Ashfield wrote: (unless you start playing with impersonation I guess?)
I don't mind which ever way i do. But this is the requirement because I can't trust all the Dlls I am using in my project.
I will be happy to do if it is possible. May be by any setting in web.config I Guess.
|
|
|
|
|
Anurag Gandhi wrote: I can't trust all the Dlls I am using in my project.
Why? They are surely under the control of YOUR application, they aren't suddenly going to start doing things by themselves - as long as your application is properly tested I can see no risk - unless its self mutating code, in which case its a virus.
Anurag Gandhi wrote: May be by any setting in web.config I Guess.
No, impersonation is something you would need to do in code just before calling your dll. I'm not sure you really understand what you are doing. A function in a DLL is called from YOUR application, usng (normally) the same credentials as the application. It is possible to change the credentials before the call by using impersonation, BUT this is something you need to be very careful of.
If all you are wantng to do is read/write to a specific folder grant access to THAT folder only, then your application cannot write to any ther location
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|