|
Hi,
How can I configure my TFS build to pick up dlls based on the build environment. For instance my directory structure is like this:
Source<br />
|______ build<br />
|______ environment<br />
|______ LIB<br />
|_____________ DEV<br />
|_____________ LOCAL<br />
|_____________ PROD<br />
|_____________ UAT<br />
|______ src<br />
|_____________ net<br />
|___________________ myProjectDirectory<br />
|______ mySolutionFile.sln
What we are needing to do is to create a build for DEV, UAT and PROD environment. We have some 3rd party dlls which reside in lib > DEV, lib > UAT, and lib > PROD. So essentially for DEV build we need to pick the dll from the lib > DEV directory, UAT build we need the dll from lib > UAT directory .. so on .. you get the idea.
Can this be accomplished? I know I havent been able to find a way to do it using Build Definition Wizard.
I would appreciate your help.
|
|
|
|
|
What we have done is to add 3rd party dlls to source control, in your case put the entire LIB folder into source control. Having doe this use relative paths in the references so that when the build server gets the latest code it also gets the matching dlls in the same relative paths.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
Thanks for answering. Above mentioned is actually the source control folder structure. Perhaps I do not understand the relative path technique, meaning I am not sure if you are referring to relative paths in the Build definitions file of if you are talking about ASP.NET references.
Would you mind elaborating it a bit?
Thanks again for your help.
|
|
|
|
|
Our Team build builds windows forms, web services and web applications that make up our product in one swoop.
The team build just says get the entire folder structure from source control then build the specified solutions.
Each solution/project then uses relative paths to any referenced dlls. By default all paths are relative if they are on the same drive.
The team build does not need to specify the references as the project does that.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
Hi there..
I basically need the following form:
1. Ask user to input a string/word using a text control
2. Ask user to input characters they want removed from the string/word using another text control
3. Display the original string with specified characters removed in reverse order
4. Display removed characters
Using the following code I have created this which almost works:
<%@ Page Language="VB" Debug="true" %><br />
<br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<html xmlns="http://www.w3.org/1999/xhtml"><br />
<br />
<head><br />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><br />
<title>Reverse Text</title><br />
<script runat="server"><br />
Sub btnSubmit_OnClick(ByVal Sender As Object, ByVal E As EventArgs)<br />
Dim lsReverse As String = txtReverse.Text<br />
Dim lsExclude As String = txtExclude.Text<br />
Dim lnExcludeLength As Integer = lsExclude.Length<br />
Dim lnReverseLength As Integer = lsReverse.Length<br />
Dim lnMaxLength As Integer = (lnReverseLength - lnExcludeLength) + 1<br />
Dim lsNewTextArray(lnReverseLength) As String<br />
Dim lsExcludedTextArray(lnExcludeLength) As String<br />
Dim item As String<br />
Dim lsReverseArray() As Char = txtReverse.Text.ToCharArray<br />
Dim lsExcludeArray() As Char = txtExclude.Text.ToCharArray<br />
Dim revcount As Integer = lsReverseArray.Length - 1<br />
Dim excount As Integer = lsExcludeArray.Length - 1<br />
Dim newcount As Integer = lsReverseArray.Length - lsExcludeArray.Length - 1<br />
<br />
<br />
For Each item In lsExcludeArray<br />
<br />
Do While revcount >= 0<br />
If item = lsReverseArray(revcount) Then<br />
lsExcludedTextArray(excount) = item<br />
revcount = revcount - 1<br />
excount = -1<br />
Else<br />
[line35] lsNewTextArray(newcount) = lsReverseArray(revcount)<br />
newcount = newcount - 1<br />
revcount = revcount - 1<br />
<br />
End If<br />
Loop<br />
Next<br />
<br />
Dim i As Integer = lsNewTextArray.Length - 1<br />
lblReversed.Text = ""<br />
Do While i >= 0<br />
lblReversed.Text = lblReversed.Text & lsNewTextArray(i)<br />
i = i - 1<br />
Loop<br />
<br />
lblExcluded.Text = lsExcludedTextArray(0)<br />
<br />
End Sub<br />
<br />
</script><br />
</head><br />
<br />
<body><br />
<br />
<form id="frmReverseText" runat="server"><br />
<asp:TextBox runat="server" id="txtReverse"></asp:TextBox><br />
<br /><br />
<br /><br />
<asp:TextBox runat="server" id="txtExclude"></asp:TextBox><br />
<br /><br />
<br /><br />
<asp:Button runat="server" OnClick="btnSubmit_OnClick" Text="Submit" id="btnSubmit" /><br />
<br /><br />
<br /><br />
<asp:Label runat="server" Text="" id="lblReversed"></asp:Label><br />
<br /><br />
<asp:Label runat="server" Text="" id="lblExcluded"></asp:Label><br />
</form><br />
<br />
</body><br />
<br />
</html>
This code reversed the text and removes the character specified
HOWEVER! - if the user inputs more than 1 character to remove from the string, an error occurs:
"Index was outside the bounds of the array. (Line 35 which is pointed out above)."
A similar error occurs if there are two of the same character within the original string (e.g. 123455)
Can anyone help me to find a way around this? Hopefully my code is easy enough to read.
Thanks in advance
RB
|
|
|
|
|
Maybe you can try this... it works fine (just pass C# to VB.NET)
On The Code of the page is:
<asp:UpdatePanel ID="UpdPnl_Test" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table>
<tr>
<td>
Text to Convert</td>
<td>
<asp:TextBox ID="Txt_Convert" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
Chars to Quit</td>
<td>
<asp:TextBox ID="Txt_CharsToQuit" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<asp:Button ID="Btn_Submit" runat="server" Text="Button"
onclick="Btn_Submit_Click" />
</td>
</tr>
<tr><td>Reversed Text: </td>
<td>
<asp:Label ID="Lbl_ReversedText" runat="server"></asp:Label>
</td>
</tr>
<tr><td>Quitted Chars: </td>
<td>
<asp:Label ID="Lbl_QuittedChars" runat="server"></asp:Label>
</td>
</tr>
</table>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Btn_Submit" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
and the Codebehind is:
protected void Btn_Submit_Click(object sender, EventArgs e)
{
Lbl_QuittedChars.Text = String.Empty;
Lbl_ReversedText.Text = String.Empty;
if (!String.IsNullOrEmpty(Txt_Convert.Text))
{
if (!String.IsNullOrEmpty this.Txt_CharsToQuit.Text))
{
string StoreResult = Txt_Convert.Text;
foreach (char CharToRemove in Txt_CharsToQuit.Text)
{
Txt_Convert.Text = Txt_Convert.Text.Replace(CharToRemove.ToString(), "");
Lbl_QuittedChars.Text += CharToRemove;
}
for (int i = Txt_Convert.Text.Length - 1; i >= 0; i--)
{
Lbl_ReversedText.Text += Txt_Convert.Text.Substring(i, 1);
}
Txt_Convert.Text = StoreResult;
}
else
{
for (int i = Txt_Convert.Text.Length - 1; i >= 0; i--)
{
Lbl_ReversedText.Text += Txt_Convert.Text.Substring(i, 1);
}
}
}
}
is 100% functional!!
|
|
|
|
|
hi guys
i am working on parent child list view , in which i am showing a child list view
which is shown upon click on linkbutton in parent listview ,
but listview is not visible at runtime upon clickink link button , got attaches
the objectdatasource at runtime no exception but child list view is not shown , please help.
child listview is hidden its shown upon orderclick labelbutton in parent listview,
there is just a bar shown upon button click but not proper listview .
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div>
<p>
<strong>Select Customer</strong>
<asp:DropDownList ID ="dpcustomers" runat ="server"
DataSourceID="customerdatasource" Width ="150px" AutoPostBack="True"
></asp:DropDownList>
<asp:Label ID="lblp" runat="server" Text="." Visible="False"></asp:Label>
</p>
<asp:ObjectDataSource ID="customerdatasource" runat="server"
SelectMethod="GetAllCustomers" TypeName="BAL.CustomerBAL">
</asp:ObjectDataSource>
</div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:ListView ID = "lstview" runat ="server" SkinID ="3"
DataSourceID="orderdatasource" onitemcommand="lstview_ItemCommand"
>
<LayoutTemplate>
<table id ="itemplaceholdercontainer" runat = "server" cellpadding ="6">
<tr runat = "server" >
<th style = " background :white">
</th>
<th>
Order ID
</th>
<th>
Customer ID
</th>
<th>
Order Date
</th>
<th>
Ship Address
</th>
<th>
Ship Country
</th>
<th>
Orders
</th>
</tr>
<tr runat ="server" id ="itemPlaceholder"></tr>
<tr>
<td>
<asp:LinkButton ID = "addnewlink" runat ="server" Text = "Add New"></asp:LinkButton>
</td>
</tr>
</table>
</LayoutTemplate>
<ItemTemplate >
<tr>
<td>
<asp:LinkButton ID="EditButton" CommandName="Edit" runat="server" Text="Edit"></asp:LinkButton>
<asp:LinkButton ID="DeleteButton" OnClientClick="return confirm('Delete Record?');" CommandName="Delete" CommandArgument='<%# Eval("CustomerID")%>' runat="server" Text="Delete"></asp:LinkButton>
</td>
<td>
<asp:Label ID = "lblorderid" runat ="server" text = '<%#Eval("orderid")%>'></asp:Label>
</td>
<td>
<asp:Label ID = "lblcustomerid" runat ="server" text = '<%#Eval("customerid")%>'></asp:Label>
</td>
<td>
<asp:Label ID = "orderdate" runat ="server" text = '<%#Eval("orderdate")%>'></asp:Label>
</td>
<td>
<asp:Label ID = "shipaddress" runat ="server" text = '<%#Eval("shipaddress")%>'></asp:Label>
</td>
<td>
<asp:Label ID = "shipcountry" runat ="server" text = '<%#Eval("shipcountry")%>'></asp:Label>
<td>
<asp:LinkButton ID="lbOrders" runat="server" Text="Orders" CommandName ="order" CommandArgument='<%#Eval("orderid") %>' />
</td>
</td>
</tr>
<%--Order List View--%>
<tr visible ="false" runat ="server" id = "roworders" style =" background :lightgrey">
<td colspan ="7">
<asp:ListView ID = "lvorders" runat ="server">
<LayoutTemplate >
<table runat ="server" id = "tbllstview">
<tr>
<th>
Order ID
</th>
<th>
Product ID
</th>
<th>
Unit Price
</th>
<th>
Quantity
</th>
<th>
Discount
</th>
</tr>
<tr runat ="server" id ="itemPlaceholder"></tr>
<tr>
<td>
<asp:LinkButton ID = "orderaddnewlink" runat ="server" Text = "Add New"></asp:LinkButton>
</td>
</tr>
</table>
</LayoutTemplate>
<ItemTemplate >
<tr>
<td>
<asp:Label ID = "lblorderid" runat ="server" text = '<%#Eval("orderid")%>'></asp:Label>
</td>
<td>
<asp:Label ID = "Lblproductid" runat ="server" text = '<%#Eval("productid")%>'></asp:Label>
</td>
<td>
<asp:Label ID = "unitprice" runat ="server" text = '<%#Eval("productid")%>'></asp:Label>
</td>
<td>
<asp:Label ID = "Lblquantity" runat ="server" text = '<%#Eval("quantity")%>'></asp:Label>
</td>
</tr>
</ItemTemplate>
</asp:ListView>
</td>
</tr>
</ItemTemplate>
</asp:ListView>
<asp:ObjectDataSource ID="orderdatasource" runat="server"
SelectMethod="GetOrdersByCustomer" TypeName="BAL.CustomerBAL">
<SelectParameters>
<asp:ControlParameter ControlID="dpcustomers" Name="customer"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
SelectMethod="GetOrdersByCustomer" TypeName="BAL.CustomerBAL">
<SelectParameters>
<asp:ControlParameter ControlID="lblp" Name="customer" PropertyName="Text"
Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="dpcustomers"
EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
</form>
</body>
Tauseef A Khan
MCP Dotnet framework 2.0.
|
|
|
|
|
Hi-
I have an interesting project to work on. Just looking for the best way to do it. I have pages where i am using different dropdowns like region, subregions, countries etc (some of them depend on each other...for example selecting a particular region with list all the subregions under that region and selecting a particular subregion will load all the countries for that subregion in the dropdown)
I want to convert each of these dropdowns into different user controls. now since some of these do depend on each other, what's the best way to communicate (for example, choosing a region user control should reload the subregion user control) in terms of best designing to keep all the user controls decoupled. Should i communicate through the container of these user controls?
Thanks in advance
|
|
|
|
|
Best way is to create a custom handler to get the JSON response to bind in the control. Just create an AJAX call to the server and write JSON array to the server.
In the callback, create the Dropdown based on those values.
|
|
|
|
|
If you want someone to learn from you example. Please explain step by step.
Thanks.
|
|
|
|
|
Where is the context ??
|
|
|
|
|
I have this in my UI
<a id="DetailLink" runat="server">
<%-- href='<%# "Handler.ashx?img_id=" + Eval("img_id") + "&" + "imagesize=F" %>'>
--%>
<img id="ImgThumbnails" class="photo_198" style="border: 4px solid white" src='<%# DataBinder.Eval(Container, "DataItem.img_id", "Handler.ashx?img_id={0}&imagesize=T") %>'
alt="Thumbnail of Photo Number <%# Eval("img_id") %>" />
</a>
protected void DLThumbnails_ItemDataBound(object sender, DataListItemEventArgs e)
{
// if you selects the thumbnail then treat image as the primary image.
// SELECT [img_id], [img_title], [img_stream] FROM [tbl_images] where img_is_primary = 1
// There is only one priary image.
if ((e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem))
{
System.Web.UI.WebControls.Image ImgNewFullSize = (System.Web.UI.WebControls.Image)e.Item.FindControl("ImgNewFullSize");
This will not work if I use Eval ==> ImgNewFullSize.ImageUrl = "Handler.ashx?img_id=" + Eval("img_id") + "&" + "imagesize=F";
there must be a way through hyperlink?
//imageRef.Attributes.Add("style", "filter:alpha(opacity=90);-moz-opacity .2;");
//imageRef.Attributes.Add("onmouseover", "javascript:makevisible(this,0);");
//imageRef.Attributes.Add("onmouseout", "javascript:makevisible(this,1);");
}
|
|
|
|
|
Hey Always remember,
If you make runat=server, only then you can access it in the server side code.
Also for runat=server controls you cant do Eval in designer to evaluate.
So do this :
<asp:linkbutton runat="server" ID="ImgNewFullSize" ....
Now you can findcontrol imgNewFullSize.
|
|
|
|
|
protected void DLThumbnails_ItemDataBound(object sender, DataListItemEventArgs e)
{
// if you selects the thumbnail then treat image as the primary image.
// SELECT [img_id], [img_title], [img_stream] FROM [tbl_images] where img_is_primary = 1
// There is only one priary image.
if ((e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem))
{
System.Web.UI.WebControls.Image ImgNewFullSize = (System.Web.UI.WebControls.Image)e.Item.FindControl("ImgNewFullSize");
==>this is where I don't know what to do? ImgNewFullSize.ImageUrl = "Handler.ashx?img_id=" + Eval("img_id") + "&" + "imagesize=F";
//imageRef.Attributes.Add("style", "filter:alpha(opacity=90);-moz-opacity .2;");
//imageRef.Attributes.Add("onmouseover", "javascript:makevisible(this,0);");
//imageRef.Attributes.Add("onmouseout", "javascript:makevisible(this,1);");
}
|
|
|
|
|
|
There are lots of differences in Server side code and client side.In client everything that goes are html. So if you want to call a server side, the only option is AJAX. You may use ICallBackEventHandler, UpdatePanel etc to do the trick.
To call a javascript function on the other hand requires you to add Attribute(Using Attributes.Add) which actually represents a client side call.
So you cant mix up them ever.
If you want to mix, you need to rely on AJAX callback to call a few code in the client side.
|
|
|
|
|
to use a javascript function and assing it in the codebehind (Attributes.Add), you must declare the <a> label including runat="server" like this
<a href="Login.aspx" runat="server" id="Link1" >Go to first page</a>
and here
protected void Page_Load(object sender, EventArgs e)
{
Link1.Attributes.Add("OnClick", "JavascriptFunction()");
}
and finally the javascript function in the page
<script language="javascript" type="text/javascript">
function JavascriptFunction() {
alert("You have recive this message when you've clicked Link1");
}
</script>
|
|
|
|
|
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:ListView ID = "lstview" runat ="server" DataSourceID="orderdatasource">
<LayoutTemplate>
<table id ="itemplaceholdercontainer">
<tr>
<th>
Order ID
</th>
<th>
Customer ID
</th>
<th>
Order Date
</th>
<th>
Ship Address
</th>
<th>
Ship Country
</th>
</tr>
<tr runat ="server" id ="itemPlaceholder"></tr>
</table>
</LayoutTemplate>
<tr>
<td>
<asp:Label ID = "lblorderid" runat ="server" text = '<%#eval(orderid)%>'></asp:Label>
</td>
<td>
<asp:Label ID = "lblcustomerid" runat ="server" text = '<%#eval(customerid)%>'></asp:Label>
</td>
<td>
<asp:Label ID = "orderdate" runat ="server" text = '<%#eval(orderdate)%>'></asp:Label>
</td>
<td>
<asp:Label ID = "shipaddress" runat ="server" text = '<%#eval(shipaddress)%>'></asp:Label>
</td>
<td>
<asp:Label ID = "shipcountry" runat ="server" text = '<%#eval(shipcountry)%>'></asp:Label>
</td>
</tr>
</asp:ListView>
<asp:ObjectDataSource ID="orderdatasource" runat="server"
SelectMethod="GetOrdersByCustomer" TypeName="BAL.CustomerBAL">
<SelectParameters>
<asp:ControlParameter ControlID="dpcustomers" Name="customer"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
</ContentTemplate>
</asp:UpdatePanel>
Tauseef A Khan
MCP Dotnet framework 2.0.
modified on Wednesday, November 18, 2009 6:01 PM
|
|
|
|
|
Very hard to understand the code if it is not formatted perfectly.
Check "Do not interpret HTML tags"
Also let me know what exactly the problem you are getting..
|
|
|
|
|
i have updated code.
Tauseef A Khan
MCP Dotnet framework 2.0.
|
|
|
|
|
As I can see the updated code, you cant place html inside a listview.
You need to place <ItemTemplate> to define your html. Just use it below your layout template.
Read this for further help :
Complete ListView in ASP.NET 3.5[^]
|
|
|
|
|
I can see your signature in between code. This is funny.
|
|
|
|
|
Maybe the old Copy/Paste doesn't work here!
mmm i can't understand that... or your problem... specify!!!
|
|
|
|
|
i have updated code.
Tauseef A Khan
MCP Dotnet framework 2.0.
|
|
|
|
|
Hi,
I am doing dissertation on web service performance testing.How we can expose distributed database using REST WEB SERVICES and how we can query the distributed database using REST Web services?We have a chance to query the distributed database using soap web service by WSDL Interface.But REST don't have WSDL Interface.
|
|
|
|