|
Please edit your post and use the pre tags to format the code and markup
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
U had suggested me to right click on the image and check the path. I had tried it but it didnt work.
My prog is running on local host so the num ber keeps changing so how can i run the program.
this was the path which was poping up on selecting the image.
Friends please help me .
http://localhost:49216/ws/App_Data/pics/pic1.jpg
In asp.net this is the coding which i have provided
asp:TableCell ID="TableCell4" ColumnSpan ="2" VerticalAlign = "Top" HorizontalAlign ="Center" runat ="server">
<asp:image id="Image1" runat="server" imageurl="../../../../../App_Data/pics/pic1.jpg">
|
|
|
|
|
sowjanya3 wrote: ImageUrl="../../../../../App_Data/pics/pic1.jpg" />
Why are you making the path relative to the page it's on instead of relative to the root of your application?
i.e.
File A is at <project root="">\images\a.jpg
So in your ImageURL you make it referenced as "/images/a.jpg"
Edit: Also your thread title is misleading. This has nothing to do with IIS or using regiis.
modified on Thursday, April 1, 2010 6:04 AM
|
|
|
|
|
hey thanks for your idea and suggestion its working man
|
|
|
|
|
Don't Put Images is App_Data Folder. AFAIK, It won't be displayed from App_Data, Due to Security Reason.
Just create a folder called Images in your Application Folder and store the images over there. Use Server.MapPath() to findout the actual url of images.
Hope this will help you.
Let me know if you have any more issue.
Thanks
Cheers !
Abhijit
Codeproject MVP
|
|
|
|
|
Hey Abhiji, even though App_Data is not visible from the user end, you can still use it data putting you data files inside. I haven't tried with image files. But I used to places all my xml files inside App_Data which is accessible for the developer/coder.
|
|
|
|
|
Yes. App_Data is storage for files like Mdf, XML etc. The real advantage is that any file you place in App_Data won't be downloadable .
Those file can be accessable by developer/Coder but not from outside, because these are not downloadable. This is the reason I guess Image not showing, as they get downloaded.
Please share your input.
Cheers !
Abhijit
Codeproject MVP
|
|
|
|
|
Yeah. You are right. I just tried with a simple sample. The image in the App_Data is inaccessible. Good to know.
|
|
|
|
|
Hi,
i developed the application in .Net Framework 1.1, the same application is working other Operating System Machines except Windows 7. if i open the application in Windows 7 Machine and click any buttons the Validation controls not working. What should i do for this? should i do any setting changes for this?
|
|
|
|
|
Could you give a few more details? (i.e. code snippet) Were you using regular expression validator controls or similar? What browsers have you tried?
|
|
|
|
|
I used the required field validator control, for checking the text box is null or not. but the same application is working in other operating system server. In the Windows 7 System , IIS is 7 and IE 8.0
. In other OS Machine when we click on the buttons it is checking the textboxes and showing the Error Messages.i copied the same application in other machines.
|
|
|
|
|
Hi I am using pop up extender in repater control.I have alink button asscoiated with for the pop up extender in repeater .I want to do processing in item command event which is not firing.
Pop up window is coming but the itme command is not firing.After some research on google i find out pop up extender block the events aasscoaited with target control id of pop up extender..
Pls note:If I remove the pop up extender then the event is firing.Clearly the issue seems to be with Pop up extender its blocking the event.
Any solutions would be really appreciated.
I have searched everywhere.
Thanks in adavnce.
Sats
|
|
|
|
|
Hi,
this is no direct answer to your question - so sorry in advance - but maybe you can solve your issue
the other way arround. Target your popup extender to a simple label like:
<asp:label id="NullControl" runat="server">
<ajax:modalpopupextender id="someExtender" runat="server" targetcontrolid="NullControl"
="" popupcontrolid="DetailsPopupPanel" cancelcontrolid="CloseButton" dropshadow="false">
And then, when your itemcommand fires, open the popup from codebehind using [extenderName].Show();.
Im doing that in a gridview and it works perfectly.
Good Luck
|
|
|
|
|
Don't set the target to the link button. Set it to some other button outside the repeater that isn't visible. Then in the item command call .show on the popup control. If you don't want a full postback you need to wrap it all in an updatePanel.
|
|
|
|
|
Dear All,
I have two listBox in my webpage which i am adding items from one to other using Javascript works fine
like i have source and destination listboxes. i am adding items from source to destination using javascript
and source is binded with datasource.
after post every thing is cleared from destination listbox.
any ideas how to save the state of both listboxes after postback?
i enabled page viewstate to true and both listbox view state to true but seems it doesent work and the same
i enabled pageviewstate in web.config file no success
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
If you are using a button to trigger the postback you could examine the data in each listbox within that event and store the data in some way (Session, ViewState, etc) and repopulate the boxes during the OnLoad event taking into account that this is a PostBack so you might have a method like:
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
if (IsPostBack)
{
}
else
{
}
}
That should get you started.
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
|
|
|
|
|
Hey Abdul,
Changes done in the client-side using JavaScript will not save it ViewState. To ASP.NET, it doesn't know that you have changed something. To fix this, use a hiddenfield. When you hit the button, get the list of item into the hiddenfield with delimiters. Once the page is back, fill the list with the items with the hiddenfield value.
Only HiddenField can maintain states all the times.
|
|
|
|
|
Thanks, HiddenField do save the status, Its really appreciated.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
hello all,
I want to fetch the static text written at html design page and then fetched data be entered into some variable at code-behind.
could anyone know the code to do so?
|
|
|
|
|
You might face problem of having some html into string variable. Please use the class "HttpUtility" and it method/property as required.
Thanks,
Arindam D Tewary
|
|
|
|
|
If content is inside a td/div/span/p then you can give the container control an Id and set its runat="server". At the server side you can access the control text using the InnerText or InnerHTML property.
WWW, WCF, WWF, WPF, WFC .... WTF
|
|
|
|
|
|
I think you have problem for getting server side error when enter html code in textbox.
For the security reason asp.net does not allow this.
But you can enable it by making
<%@ Page validateRequest="false" %>
Mohan
|
|
|
|
|
Hello,
I have a ListView with EditItemTemplate.
The problem is when I edit an Item, the EditItemTemplate showing out,
but the items layout below the EditItemTemplate become weird.
I attach my screenshot and code behind, hope any one can help me.
http://img28.imageshack.us/img28/3550/91358941.jpg[^]
http://img202.imageshack.us/img202/3694/62318841.jpg[^]
<LayoutTemplate>
<table border="0" width="100%" style="background-color: #FFFFFF; border-collapse: collapse;
border-color: #999999; border-style: none; border-width: 1px; font-family: Verdana, Arial, Helvetica, sans-serif;">
<thead>
<tr style="background-color: #E4E4E4; color: #FFFFFF;">
<td align="left" width="55%">
<asp:Label ID="docLabel" runat="server" Font-Size="10" Font-Names="Arial">DOCUMENT</asp:Label>
</td>
<td align="left" width="30%">
<asp:Label ID="Label8" runat="server" Font-Size="10" Font-Names="Arial">LAST UPDATE</asp:Label>
</td>
<td width="15%">
</td>
</tr>
</thead>
<tbody>
<tr id="itemPlaceholder" runat="server" width="100%" />
</tbody>
<tfoot>
<table width="100%">
<tr>
<td align="center" width="100%" style="text-align: center; background-color: #E4E4E4;
font-family: Verdana, Arial, Helvetica, sans-serif; color: #FFFFFF">
<asp:DataPager ID="DataPager1" runat="server">
<Fields>
<asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowNextPageButton="False"
ShowPreviousPageButton="False" />
<asp:NumericPagerField />
<asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" ShowNextPageButton="False"
ShowPreviousPageButton="False" />
</Fields>
</asp:DataPager>
</td>
</tr>
</table>
</tfoot>
</table>
</LayoutTemplate>
<EditItemTemplate>
<table width="100%" border="1" cellspacing="0" cellpadding="0" style="border: thin dotted #FF0000">
<tr>
<td align="center">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<br />
<td align="right">
Name
</td>
<td>
:
</td>
<td align="left">
<asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>' Visible="false" />
<asp:TextBox ID="namebox" runat="server" Text='<%# Bind("Name") %>'></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
Permission
</td>
<td>
:
</td>
<td>
<br />
<table border="0" cellpadding="0" cellspacing="0" style="width: 68%">
<tr>
<td align="center">
Available Group
</td>
<td>
</td>
<td width="47%" align="center">
Selected Group
</td>
</tr>
<tr>
<td>
<asp:ListBox ID="GroupListBox" runat="server" Width="125px" DataSourceID="SqlDataSource5"
DataTextField="Name" DataValueField="ID" Height="160px"></asp:ListBox>
</td>
<td>
<asp:Button ID="selectAllBtn" runat="server" Text=">>" CommandName="SelectAll" />
<br />
<asp:Button ID="selectBtn" runat="server" Text=" > " CommandName="SelectOne" />
<br />
<br />
<asp:Button ID="deSelectAllBtn" runat="server" Text="<<" CommandName="DeselectAll" />
<br />
<asp:Button ID="deselectBtn" runat="server" Text=" < " CommandName="DeselectOne" />
</td>
<td>
<asp:ListBox ID="selectedGroupListBox" runat="server" Width="125px" DataSourceID="SqlDataSource6"
DataTextField="Name" DataValueField="ID" Height="160px"></asp:ListBox>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="right">
PDF File
</td>
<td>
:
</td>
<td align="left">
<asp:LinkButton ID="pdfFile" runat="server" Text='<%# Bind("pdfPath") %>' />
<cc1:AsyncFileUpload ID="pdfFileUpload1" runat="server"/>
</td>
</tr>
<tr>
<td align="right">
Source File
</td>
<td>
:
</td>
<td align="left">
<asp:LinkButton ID="sourceFile" runat="server" Text='<%# Bind("docPath") %>' />
<cc1:AsyncFileUpload ID="sourceFileUpload1" runat="server" />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center">
<asp:Button ID="updateBtn" runat="server" Text="Update" CommandName="Updated" />
<asp:Button ID="CancelBtn" runat="server" Text="Cancel" CommandName="Cancel" />
</td>
</tr>
</table>
</EditItemTemplate>
<ItemTemplate>
<td runat="server" style="">
<table cellpadding="0" cellspacing="0" class="style14">
<tr>
<td>
<img src="images/arrow.gif" style="width: 18px; height: 18px" />
</td>
<td>
<asp:Label ID="subCatID" runat="server" Text='<%# Eval("ID") %>' Visible="False"></asp:Label>
<asp:LinkButton ID="LinkButton3" runat="server" Font-Names="Arial" Font-Size="10pt"
Font-Underline="False" ForeColor="Black" Text='<%# Eval("Name") %>' CommandName="Click"></asp:LinkButton>
</td>
<td width="2px">
</td>
<td align="right">
<asp:ImageButton ID="editSubCatBtn" runat="server" ImageUrl="~/images/pencil_16.png"
title="Edit" CommandName="Edit" Visible='<%# CBOOL(Eval("subCatModifyable")) %>' />
</td>
<td align="right">
<asp:ImageButton ID="delSubCatBtn" runat="server" CommandName="Delete" ImageUrl="~/images/delete_16.png"
title="Delete" Visible='<%# CBOOL(Eval("subCatModifyable")) %>' />
</td>
</tr>
</table>
</td>
</ItemTemplate>
C@lven Yow
modified on Thursday, April 1, 2010 3:47 AM
|
|
|
|
|
My webform has a link to download a sverver file: "http://Server/App/UpLoad/File1.xls".But when I have upload a new file to replace the old file(File1.xls),this link still download the old file.The stanger thing is when I have deleted "File1.xls",it also download the old file(where the old file from ?!).
All of our client machines have this problem,but when used in the Server's browser, it all works well.
Can anyone help me?
Thanks a lot.
Forgive my poor English
|
|
|
|