16,011,947 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by ubaidh sayed (Top 22 by date)
ubaidh sayed
19-Mar-13 6:55am
View
And the data that i am trying to pull is flash file.
ubaidh sayed
19-Mar-13 6:53am
View
Our client MB India would like to know if the pages from the main corporate website can be incorporated as it is on the dealership websites.
http://www.mercedes-benz.co.in/content/india/mpc/mpc_india_website/enng/home_mpc/passengercars/home/new_cars/models/b-class/w246.flash.html#_int_passengercars:home:model-navi:w246
the link above is on the corporate website for the B class which needs to be incorporated on the all dealership websites. The header and footer of the dealerships will be maintained with the content from the main site.
http://autohangar.mercedes-benzdealers.co.in/Pages03/BClass.aspx
ubaidh sayed
28-Jan-13 9:20am
View
Code is not short :)
ubaidh sayed
30-Jul-11 2:08am
View
I have tried that but nothing seems to work.
Here is my updated code.
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="Server">
<asp:ScriptManager ID="MainScriptManager" runat="server" EnablePartialRendering="true" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">
<asp:DataList ID="dlProdocut" runat="server" RepeatColumns="3" RepeatDirection="Horizontal"
BorderColor="Black">
<asp:Table ID="Table1" runat="server" border="0" CellSpacing="0" CellPadding="0">
<asp:TableRow>
<asp:TableCell Height="10" HorizontalAlign="Center" VerticalAlign="Top">
<%--Image--%>
<asp:TableRow>
<asp:TableCell Height="150" Width="7" HorizontalAlign="left" VerticalAlign="top">
<asp:HyperLink ID="hyrProductImg" runat="server">
<img alt='<%# DataBinder.Eval(Container.DataItem,"Title")%>' src="../images/<%# DataBinder.Eval(Container.DataItem,"SmallImage") %>" border="0" width="226" height="166" />
<asp:TableCell Width="5">
<%--Title--%>
<asp:TableRow>
<asp:TableCell Height="45" Width="7" CssClass="product-name" HorizontalAlign="Center"
VerticalAlign="Top">
<%# DataBinder.Eval(Container.DataItem, "Title")%>
<%--ShortDescription--%>
<asp:TableRow>
<asp:TableCell Width="7" HorizontalAlign="Justify" VerticalAlign="Top" CssClass="testimonial-text">
<asp:Label ID="Label1" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"ShortDescription")%>'>
<%--Read More--%>
<asp:TableRow>
<asp:TableCell HorizontalAlign="Left">
<asp:HyperLink ID="lnkProductDetails" CssClass="read-more" runat="server">Read More →
<asp:TableRow>
<asp:TableCell Height="60" HorizontalAlign="Justify" VerticalAlign="Top" CssClass="testimonial-text">
<asp:Label ID="lblPage" runat="server" Text="" />
<asp:Button ID="Button1" runat="server" Text="<<" />
<asp:Button ID="btnNext" runat="server" Text=">>" OnClick="btnNext_Click" />
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnNext" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="dlProdocut" />
</Triggers>
<asp:Panel ID="BottomPager_Panel" runat="server">
ubaidh sayed
26-Jul-11 7:56am
View
Deleted
I have tried that but nothing seems to work.
Here is my updated code.
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="Server">
<asp:ScriptManager ID="MainScriptManager" runat="server" EnablePartialRendering="true" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">
<contenttemplate>
<asp:DataList ID="dlProdocut" runat="server" RepeatColumns="3" RepeatDirection="Horizontal"
BorderColor="Black">
<itemtemplate>
<asp:Table ID="Table1" runat="server" border="0" CellSpacing="0" CellPadding="0">
<asp:TableRow>
<asp:TableCell Height="10" HorizontalAlign="Center" VerticalAlign="Top">
<%--Image--%>
<asp:TableRow>
<asp:TableCell Height="150" Width="7" HorizontalAlign="left" VerticalAlign="top">
<asp:HyperLink ID="hyrProductImg" runat="server">
<img alt='<%# DataBinder.Eval(Container.DataItem,"Title")%>' src="../images/<%# DataBinder.Eval(Container.DataItem,"SmallImage") %>" border="0" width="226" height="166" />
<asp:TableCell Width="5">
<%--Title--%>
<asp:TableRow>
<asp:TableCell Height="45" Width="7" CssClass="product-name" HorizontalAlign="Center"
VerticalAlign="Top">
<%# DataBinder.Eval(Container.DataItem, "Title")%>
<%--ShortDescription--%>
<asp:TableRow>
<asp:TableCell Width="7" HorizontalAlign="Justify" VerticalAlign="Top" CssClass="testimonial-text">
<asp:Label ID="Label1" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"ShortDescription")%>'>
<%--Read More--%>
<asp:TableRow>
<asp:TableCell HorizontalAlign="Left">
<asp:HyperLink ID="lnkProductDetails" CssClass="read-more" runat="server">Read More →
<asp:TableRow>
<asp:TableCell Height="60" HorizontalAlign="Justify" VerticalAlign="Top" CssClass="testimonial-text">
<asp:Label ID="lblPage" runat="server" Text="" />
<asp:Button ID="Button1" runat="server" Text="<<" />
<asp:Button ID="btnNext" runat="server" Text=">>" OnClick="btnNext_Click" />
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnNext" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="dlProdocut" />
</Triggers>
<asp:Panel ID="BottomPager_Panel" runat="server">
ubaidh sayed
26-Jul-11 1:38am
View
Hi Al Moje,
Adding this part in code
<asp:AsyncPostBackTrigger ControlID="dlProdocut" EventName="Click"/> gives me an error.
"Could not find an event named 'Click' on associated control 'dlProdocut' for the trigger in UpdatePanel 'UpdatePanel1'."
Adding this
<asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="false" UpdateMod="Conditional">
is not working either.
ubaidh sayed
22-Jul-11 6:57am
View
Hello Algem,
Thanks for replying. Yes you are right my page is using a master page and the variables you mentioned are public static and first time they are called and initialized in the "is postback" section of page load" i.e
if (!IsPostBack)
{
pageCount = 1;
PageNo = 1;
startPage = 6 * (PageNo - 1) + 1;
lastPage = startPage + 5;
bindDataList();
}
and later the value changes on click of the next button
i.e
protected void btnNext_Click(object sender, EventArgs e)
{
dlProdocut.DataSource = null;
dlProdocut.DataBind();
pageCount++;
PageNo = pageCount;
startPage = 6 * (PageNo - 1) + 1;
lastPage = startPage + 5;
bindDataList();
}
The problem i think is that the trigger
<asp:AsyncPostBackTrigger ControlID="btnNext" />
is not updating the update panel.
I tried updatepanel1.update() but dint work. The problem is that the update panel is not getting updated.
ubaidh sayed
18-Jun-11 2:36am
View
Restarted the system and it worked.
Lol !!!
Dint change a line of code.
ubaidh sayed
10-Jun-11 5:38am
View
CDP1802 : Thanks , That helped me :-)
ubaidh sayed
9-Jun-11 2:28am
View
i tried setting it in this control "index leftmenu 1024.ascx" But it dint work.
ubaidh sayed
7-Jun-11 4:48am
View
Sorry walterhevedeich,
Just downloaded the new version DotNetNuke_Community_06.00.00_Install and saw that the code is in C#.
Thanks a million. :-)
ubaidh sayed
7-Jun-11 4:42am
View
Thanks walterhevedeich,
But does that mean i have to design my website in VB .Net and there is no other work around ????
ubaidh sayed
17-May-11 3:24am
View
Thanks a million saxenaabhi6 .
That worked for me.
ubaidh sayed
17-May-11 2:55am
View
i am binding the grid using a datatable.
so do you want me to do something like
<asp:LinkButton id="LinkButton1"
Text="Order Item 10001"
CommandName="Edit"
CommandArgument="VersionID" [This i have id datatable ]
runat="server"/>
ubaidh sayed
17-May-11 2:49am
View
As i said i am real new to coding.
How can i add command arguments ??
ubaidh sayed
16-May-11 8:45am
View
That Dint help me. :(
ubaidh sayed
26-Apr-11 5:36am
View
Will do some RND and get back to you.
Thanks for the help.
ubaidh sayed
22-Apr-11 3:03am
View
Thanks nit_singh.
Its resolved.
ubaidh sayed
31-Jan-11 7:22am
View
Hi Steve Wellens,
That worked for me :-)
But now i have a new problem.
I am adding UC on click of a button like this :
<pre lang="midl">Control MyUserControl;
// Load user control dynamically
MyUserControl = LoadControl("MyControl.ascx");</pre>
so its creating new object of UC on each click.
The UC contains delete radio button[delete the image], cover radio button[Set the image as cover of the album] and the image.
On all the uc created on click of button adds the UC with these three things.
So the problem is i m able to select cover radio button on all images which should not be the case as only one image can be set as the cover of album which means i should be able to select only one cover radio button of all the UC added.
I have given the same group name for both the rb.
Here is the complete code.
protected void btnAddURL_Click(object sender, EventArgs e)
{
if (FileUpload1.HasFile)
{
// Add File Name into array list for further reference
ItemList.Add(FileUpload1.FileName);
// Add URL to Text Box.
txtAddURL.Text = txtAddURL.Text + System.Environment.NewLine + System.IO.Path.GetFullPath(FileUpload1.PostedFile.FileName);
// Create Thumbnail.
FileUpload1.SaveAs(@"D:\ASP\Project_Dec_16\RealEstate\SaveImage\" + FileUpload1.FileName);
System.Drawing.Image img1 = System.Drawing.Image.FromFile(@"D:\ASP\Project_Dec_16\RealEstate\SaveImage\" + FileUpload1.FileName);
System.Drawing.Image bmp2 = img1.GetThumbnailImage(100, 100, null, IntPtr.Zero);
bmp2.Save(@"D:\ASP\Project_Dec_16\RealEstate\SaveImage\thumbnail\L\" + FileUpload1.FileName);
showImage();
}
}
public void show()
{
PlaceHolder p = new PlaceHolder();
p.Controls.Clear();
Panel2.Controls.Clear();
for (int i = 0; i <= ItemList.Count - 1; i++)
{
// Load user control dynamically
MyUserControl = LoadControl("MyControl.ascx");
MyUserControl.ID = "MyUserControl" + i.ToString() ;
// Find Radio Button
RadioButton rdb1 = (RadioButton)MyUserControl.FindControl("deleteimage");
RadioButton rdb2 = (RadioButton)MyUserControl.FindControl("setascover");
// Attach Group Name.
rdb1.GroupName = "G";
rdb1.ID = "Rb_ID_D" + i.ToString();
rdb1.AutoPostBack = false;
rdb1.CheckedChanged +=new EventHandler(rdb1_CheckedChanged);
//Attach Group Name.
rdb2.GroupName = "G";
rdb2.ID = "Rb_ID_C" + i.ToString();
rdb2.AutoPostBack = false;
rdb2.CheckedChanged += new EventHandler(rdb2_CheckedChanged);
//Attach URL to Image.
Image MyImage = (Image)MyUserControl.FindControl("Image1");
MyImage.ImageUrl = "~/SaveImage/thumbnail/L/" + ItemList[i].ToString();
p.Controls.Add(MyUserControl);
Panel2.Controls.Add(p);
}
}
ubaidh sayed
31-Jan-11 2:15am
View
Deleted
The problem i this is that in show() i am creating a new instance of the user control
MyUserControl = LoadControl("MyControl.ascx");
MyUserControl.ID = "MyUserControl" + i.ToString() ;
So its a new control altogether.
ubaidh sayed
31-Jan-11 2:03am
View
Hi Ryan Zahra,
Image as cover means, when u add an image on face book or orkut you select a radiobutton as cover and that image is set as a cover of your album i wanna do the same.
I have created a user control which has a image, delete radio button and cover radio button.
I am adding this control dynamically at runtime. I am able to add the control at runtime.
1> As i am adding more than one usercontrol at runtime, all images contain delete and cover radio button. Nw problem is as Album can have only one cover so the user should be able to select only one cover radio button from all the images which is not the case in mine.
Here is the code.
protected void btnAddURL_Click(object sender, EventArgs e)
{
if (FileUpload1.HasFile)
{
// Store file Name in arraylist for further reference.
ItemList.Add(FileUpload1.FileName);
// Add URL in a text box[Just to display]
txtAddURL.Text = txtAddURL.Text + System.Environment.NewLine + System.IO.Path.GetFullPath(FileUpload1.PostedFile.FileName);
// Create Thumbnail.
FileUpload1.SaveAs(@"D:\ASP\Project_Dec_16\RealEstate\SaveImage\" + FileUpload1.FileName);
System.Drawing.Image img1 = System.Drawing.Image.FromFile(@"D:\ASP\Project_Dec_16\RealEstate\SaveImage\" + FileUpload1.FileName);
System.Drawing.Image bmp2 = img1.GetThumbnailImage(100, 100, null, IntPtr.Zero);
bmp2.Save(@"D:\ASP\Project_Dec_16\RealEstate\SaveImage\thumbnail\L\" + FileUpload1.FileName);
showImage();
}
}
public void showImage()
{
PlaceHolder p = new PlaceHolder();
p.Controls.Clear();
Panel2.Controls.Clear();
for (int i = 0; i <= ItemList.Count - 1; i++)
{
// Load user control dynamically
MyUserControl = LoadControl("MyControl.ascx");
MyUserControl.ID = "MyUserControl" + i.ToString() ;
// Find Radio Button
RadioButton rdb1 = (RadioButton)MyUserControl.FindControl("deleteimage");
RadioButton rdb2 = (RadioButton)MyUserControl.FindControl("setascover");
// Attach Group Name.
rdb1.GroupName = "G";
rdb1.ID = "Rb_ID_D" + i.ToString();
rdb1.AutoPostBack = false;
rdb1.CheckedChanged +=new EventHandler(rdb1_CheckedChanged);
//Attach Group Name.
rdb2.GroupName = "G";
rdb2.ID = "Rb_ID_C" + i.ToString();
rdb2.AutoPostBack = false;
rdb2.CheckedChanged += new EventHandler(rdb2_CheckedChanged);
//Attach URL to Image.
Image MyImage = (Image)MyUserControl.FindControl("Image1");
MyImage.ImageUrl = "~/SaveImage/thumbnail/L/" + ItemList[i].ToString();
p.Controls.Add(MyUserControl);
Panel2.Controls.Add(p);
}
}
Please help or suggest a different way to do so.
ubaidh sayed
27-Jan-11 10:37am
View
Hi Ryan Zahra,
That worked.
Now i have a image and two radio buttons.
1> delete [If i click on this radio button this image should be deleted]
2> cover [if i click on this radio button this image should be set as the cover page of my album]
3> image.
What logic shall i follow to achieve this??
Show More