Click here to Skip to main content
15,897,315 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Sub menu - How to write click event? Pin
Paulraj G28-Feb-10 20:28
Paulraj G28-Feb-10 20:28 
GeneralRe: Sub menu - How to write click event? Pin
Abhijit Jana28-Feb-10 20:42
professionalAbhijit Jana28-Feb-10 20:42 
GeneralRe: Sub menu - How to write click event? Pin
Paulraj G28-Feb-10 21:42
Paulraj G28-Feb-10 21:42 
GeneralRe: Sub menu - How to write click event? Pin
Abhijit Jana28-Feb-10 21:45
professionalAbhijit Jana28-Feb-10 21:45 
QuestionPackaging a web application Pin
Priyanka15 g28-Feb-10 16:26
Priyanka15 g28-Feb-10 16:26 
AnswerRe: Packaging a web application Pin
sashidhar28-Feb-10 20:13
sashidhar28-Feb-10 20:13 
AnswerRe: Packaging a web application Pin
Abhijit Jana28-Feb-10 20:21
professionalAbhijit Jana28-Feb-10 20:21 
QuestionRefreshing a datalist in the behind code gives conflict. Pin
macupryk28-Feb-10 16:03
macupryk28-Feb-10 16:03 
public



void BindThumbnails()
{
DataSet ds = new DataSet();
ds = GetBinaryImagesByProfileID.FetchAllImagesInfo(intGetProfileID, "omegaloveConnectionString");
DLThumbnails.DataSource = ds;
DLThumbnails.DataBind();
}

Now when I come to the page on load I call the method BindThumbnails with a variable intGetProfileID
Will refresh the databind.


<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:omegaloveConnectionString %>"
SelectCommand="sprGetBinaryImages" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter Name="ProfileID" Type="Int32" DefaultValue="0" />
</SelectParameters>
</asp:SqlDataSource>
<asp:DataList ID="DLThumbnails" runat="server" RepeatDirection="Horizontal" CellPadding="3" DataKeyField="img_id"
HorizontalAlign="Center" CssClass="view" RepeatColumns="5" Item-BorderWidth="1"
Item-BorderColor="#c0c0c0" OnItemDataBound="DLThumbnails_ItemDataBound" OnItemCommand="DLThumbnails_ItemCommand"
BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px"
GridLines="Horizontal" ShowFooter="False" ShowHeader="False"
DataSourceID="SqlDataSource1">
<FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
<ItemStyle Width="20%" BackColor="#E7E7FF" ForeColor="#4A3C8C" BorderColor="silver"
BorderStyle="dotted" BorderWidth="3px" HorizontalAlign="Center" VerticalAlign="Bottom" />
<SelectedItemStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
<HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
<FooterTemplate>
</FooterTemplate>
</asp:DataList>



How can I fix the above so I do not get the following error:

Both DataSource and DataSourceID are defined on 'DLThumbnails'. Remove one definition.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Both DataSource and DataSourceID are defined on 'DLThumbnails'. Remove one definition.

Source Error:

Line 82: ds = GetBinaryImagesByProfileID.FetchAllImagesInfo(intGetProfileID, "omegaloveConnectionString");
Line 83: DLThumbnails.DataSource = ds;
Line 84: DLThumbnails.DataBind();Line 85: //CountPhotos = Convert.ToInt32(ds.Tables[0].Rows[0]["NumberOfPhotos"].ToString());
AnswerRe: Refreshing a datalist in the behind code gives conflict. Pin
Abhijit Jana28-Feb-10 20:27
professionalAbhijit Jana28-Feb-10 20:27 
QuestionWeb control which uses generics - how to use it from aspx page? Pin
Member 103390728-Feb-10 9:45
Member 103390728-Feb-10 9:45 
AnswerRe: Web control which uses generics - how to use it from aspx page? Pin
Abhijit Jana28-Feb-10 20:30
professionalAbhijit Jana28-Feb-10 20:30 
QuestionCan a DotNet2.0 webservice be called by ASP.net1.1 project??? Pin
K.Safvi28-Feb-10 7:50
K.Safvi28-Feb-10 7:50 
AnswerRe: Can a DotNet2.0 webservice be called by ASP.net1.1 project??? Pin
sashidhar28-Feb-10 20:06
sashidhar28-Feb-10 20:06 
GeneralRe: Can a DotNet2.0 webservice be called by ASP.net1.1 project??? Pin
K.Safvi28-Feb-10 22:04
K.Safvi28-Feb-10 22:04 
GeneralRe: Can a DotNet2.0 webservice be called by ASP.net1.1 project??? Pin
sashidhar28-Feb-10 22:16
sashidhar28-Feb-10 22:16 
QuestionHow to de-batch very large XMLDocument into bit size chunks Pin
ONeil Tomlinson28-Feb-10 6:36
ONeil Tomlinson28-Feb-10 6:36 
AnswerRe: How to de-batch very large XMLDocument into bit size chunks Pin
Not Active28-Feb-10 7:33
mentorNot Active28-Feb-10 7:33 
AnswerRe: How to de-batch very large XMLDocument into bit size chunks [modified] Pin
Rutvik Dave28-Feb-10 8:33
professionalRutvik Dave28-Feb-10 8:33 
GeneralRe: How to de-batch very large XMLDocument into bit size chunks Pin
ONeil Tomlinson2-Mar-10 4:48
ONeil Tomlinson2-Mar-10 4:48 
QuestionWeb Service Created by C#.net how to move from IIS to Apache? Pin
Fired.Fish.Gmail28-Feb-10 4:58
Fired.Fish.Gmail28-Feb-10 4:58 
AnswerRe: Web Service Created by C#.net how to move from IIS to Apache? Pin
Abhishek Sur28-Feb-10 5:47
professionalAbhishek Sur28-Feb-10 5:47 
GeneralRe: Web Service Created by C#.net how to move from IIS to Apache? Pin
Fired.Fish.Gmail28-Feb-10 21:56
Fired.Fish.Gmail28-Feb-10 21:56 
QuestionEnabling AJAX ComboBox ? Pin
paper6728-Feb-10 3:46
paper6728-Feb-10 3:46 
AnswerRe: Enabling AJAX ComboBox ? Pin
Not Active28-Feb-10 7:30
mentorNot Active28-Feb-10 7:30 
AnswerRe: Enabling AJAX ComboBox ? Pin
Rutvik Dave28-Feb-10 8:27
professionalRutvik Dave28-Feb-10 8:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.