|
Hi friends
How import print options in Report viewer? I am using Report viewer control in
my application. But the print image doesnt appear in my application. what wil i
do? I searched in msdn also. They give that to install Activex control. I cant
understood friends. Because without print image how can i print the page?
please give the solutions. Its very important me.
Hopes for ur's reply.
Thanks
Every Successful Person Have A Painful Story
|
|
|
|
|
Hi,
i am developing a website, in that lot of advertisements are there, there is no particular to display the advertisement, means the Advertisement can be in .swf format, .jpg/.gif in any of the format, that is user's choice, for that i am checking the extension and binding to the StringBuilder and assigning to span tag, now it is working fine, but i want server side click event for each image, because client wants no.of clicks on each image so, it needs to store in the database.
Can you please help me out, if any one have solution for this?
Thanks & Regards
Murthy
|
|
|
|
|
hi,
iam unable to color the cells of table i did coding like this but not able to get result any one please suggest me where iam doing mistake .
Dim tbl As Table = New Table()
Dim tr As TableRow = New TableRow()
Dim tc As TableCell = New TableCell()
tc.ColumnSpan = 4
tc.RowSpan = 1
tc.Text = "8AM"
tr.Cells.Add(tc)
Table1.Rows.Add(tr)
Dim tc1 As TableCell = New TableCell
tc1.ColumnSpan = 4
tc1.RowSpan = 1
tc1.Text = "9AM"
tr.Cells.Add(tc1)
Table1.Rows.Add(tr)
Dim tc2 As TableCell = New TableCell
tc2.ColumnSpan = 4
tc2.RowSpan = 1
tc2.Text = "10AM"
tr.Cells.Add(tc2)
Table1.Rows.Add(tr)
Dim tc3 As TableCell = New TableCell
tc3.ColumnSpan = 4
tc3.RowSpan = 1
tc3.Text = "11AM"
tr.Cells.Add(tc3)
Table1.Rows.Add(tr)
Dim tc4 As TableCell = New TableCell
tc4.ColumnSpan = 4
tc4.RowSpan = 1
tc4.Text = "12PM"
tr.Cells.Add(tc4)
Table1.Rows.Add(tr)
Dim tc5 As TableCell = New TableCell
tc5.ColumnSpan = 4
' tc5.RowSpan = 1
tc5.Text = "1PM"
tr.Cells.Add(tc5)
Table1.Rows.Add(tr)
Dim tc6 As TableCell = New TableCell
tc6.ColumnSpan = 4
tc6.RowSpan = 1
tc6.Text = "2PM"
tr.Cells.Add(tc6)
Table1.Rows.Add(tr)
Dim tc7 As TableCell = New TableCell
tc7.ColumnSpan = 4
tc7.RowSpan = 1
tc7.Text = "3PM"
tr.Cells.Add(tc7)
Table1.Rows.Add(tr)
Dim tr2 As TableRow = New TableRow
Dim trcell As TableCell = New TableCell
Dim i As Integer
Dim MyArray() As Integer = {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
For i = 0 To 31
If MyArray(i) = 1 Then
trcell.BackColor = Drawing.Color.Green
Else
trcell.BackColor = Drawing.Color.Yellow
End If
tr2.Cells.Add(trcell)
Next
Table1.Rows.Add(tr2)
In above code second row is not displaying please suggest me where iam wrong .
Regards
Rameez
|
|
|
|
|
Next time, please use the code block tags and post only the code that is causing the problem.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
here is code which causes error row is not created
Dim tr2 As TableRow = New TableRow
Dim trcell As TableCell = New TableCell
Dim i As Integer
Dim MyArray() As Integer = {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
For i = 0 To 31
If MyArray(i) = 1 Then
trcell.BackColor = Drawing.Color.Green
Else
trcell.BackColor = Drawing.Color.Yellow
End If
tr2.Cells.Add(trcell)
Next
Table1.Rows.Add(tr2)
kindly suggest me where iam doing error
thanks
remaeez
|
|
|
|
|
Hello All,
I have been trying to make this work for the last few days with no avail.
I am trying to write a custom composite control that contains a couple of labels and a textbox. I have three properties: Label, Seperator and TextBoxText, all are string and are values of the Label control, Label control, and Textbox control, respectively. When i change the values of the textbox and seperator, the text is persisted when i toggle between the designer and the source code, the label on the other hand, does not. The actual values for all the properties are written as attributes in the control. See code below. Im not sure if im doing something wrong or VS2005 is buggy.
Your help will be higly appreciated. Thank you in advance.
Here is my declarative code:
<cc1:FusionTextBoxOld ID="FusionTextBoxOld1" runat="server" Label="First Name" Seperator="-" TextBoxText="enter first name" />
Here is my control code:
[DefaultProperty("TextBoxText")]
[ToolboxData("<{0}:FusionTextBoxOld runat=server></{0}:FusionTextBoxOld>")]
public class FusionTextBoxOld : CompositeControl
{
Style _LabelStyle = new Style();
TextBox _textBox = new TextBox();
Label _label = new Label();
Label _seperator = new Label();
#region TextBox
[Bindable(true)]
[Category("Appearance: TextBox")]
[DefaultValue("")]
[Localizable(true)]
[PersistenceMode(PersistenceMode.Attribute)]
public string TextBoxText
{
get
{
EnsureChildControls();
String s = (String)ViewState["TextBoxText"];
return ((s == null) ? String.Empty : s);
}
set
{
EnsureChildControls();
ViewState["TextBoxText"] = value;
}
}
#endregion
#region Label
[Bindable(true)]
[Category("Appearance: Label")]
[DefaultValue("Label")]
[Localizable(true)]
[PersistenceMode(PersistenceMode.Attribute)]
public string Label
{
get
{
EnsureChildControls();
String s = (String)ViewState["Label"];
return ((s == null) ? "Label" : s);
}
set
{
EnsureChildControls();
ViewState["Label"] = value;
}
}
[Bindable(true)]
[Category("Appearance: Label")]
[DefaultValue(":")]
[Localizable(true)]
[PersistenceMode(PersistenceMode.Attribute)]
public string Seperator
{
get
{
EnsureChildControls();
String s = (String)ViewState["Seperator"];
return ((s == null) ? ":" : s);
}
set
{
EnsureChildControls();
ViewState["Seperator"] = value;
}
}
[Bindable(true)]
[Category("Appearance: Label")]
[DefaultValue("")]
[Localizable(true)]
[PersistenceMode(PersistenceMode.Attribute)]
public string LabelCssStyle
{
get
{
String s = (String)ViewState["LabelCssStyle"];
return ((s == null) ? "" : s);
}
set
{
ViewState["LabelCssStyle"] = value;
}
}
[Bindable(true)]
[Category("Appearance: Label")]
[DefaultValue(typeof(Style))]
[Localizable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public Style LabelStyle
{
get
{
if (_LabelStyle == null)
_LabelStyle = new Style();
return _LabelStyle;
}
set
{
this._LabelStyle = value;
}
}
#endregion
#region Required Label
[Bindable(true)]
[Category("Appearance: Required Label")]
[DefaultValue("*")]
[Localizable(true)]
public string RequiredLabelText
{
get
{
EnsureChildControls();
String s = (String)ViewState["RequiredLabelText"];
return ((s == null) ? "*" : s);
}
set
{
EnsureChildControls();
ViewState["RequiredLabelText"] = value;
}
}
[Bindable(true)]
[Category("Appearance: Required Label")]
[DefaultValue("")]
[Localizable(true)]
public string RequiredLabelCssStyle
{
get
{
EnsureChildControls();
String s = (String)ViewState["RequiredLabelCssStyle"];
return ((s == null) ? "" : s);
}
set
{
EnsureChildControls();
ViewState["RequiredLabelCssStyle"] = value;
}
}
private Style _RequiredLabelStyle;
[Bindable(true)]
[Category("Appearance: Required Label")]
[DefaultValue(typeof(Style))]
[Localizable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public Style RequiredLabelStyle
{
get
{
EnsureChildControls();
if (_RequiredLabelStyle == null)
{
_RequiredLabelStyle = new Style();
_RequiredLabelStyle.ForeColor = Color.Red;
}
return _RequiredLabelStyle;
}
set
{
EnsureChildControls();
_RequiredLabelStyle = value;
}
}
#endregion
#region Overrides
protected override void CreateChildControls()
{
this.InitializeComponents();
this.ConfigureLabel();
this.ConfigureSeperatorLabel();
this.ConfigureTextBox();
}
#endregion
private void InitializeComponents()
{
Controls.Add(_label);
Controls.Add(_seperator);
Controls.Add(_textBox);
}
private void ConfigureLabel()
{
this._label.Text = this.Label;
this._label.ControlStyle.CopyFrom(this.LabelStyle);
this._label.CssClass = this.LabelCssStyle;
}
private void ConfigureSeperatorLabel()
{
this._seperator.Text = this.Seperator;
this._seperator.ControlStyle.CopyFrom(this.LabelStyle);
this._seperator.CssClass = this.LabelCssStyle;
}
private void ConfigureTextBox()
{
this._textBox.Text = this.TextBoxText;
switch (this.TextBoxType)
{
case TextBoxType.Email:
this.ConfigureEmailValidator();
break;
}
}
}
|
|
|
|
|
I am at my whits end. I have posted to so many forums and not 1 person can answer my question. Please someone help.
I had to get a new computer and can't use VS.net 2003 or 2005 with Vista. So I have 2008 now. I have an existing website that was built with YahooSiteBuilder. I have a shopping cart page with nothing on it but the background environment because I don't have any buttons on the pages that will use the shopping cart page because YahooSiteBuilder doesn't have a way for me to do that. Just submit and reset buttons. I want an Add to Cart which I can add and then the action will be adding to the shopping cart, but can't do this with sitebuilder. I also have a user form for the newsletter. This is not really my problem or question. My problem is when using asp.net I can create a new website however if I import my sitebuilder site, I must be missing something in how to make this all work together. Looking at my default.aspx page everything looks to go between the , however if I put my HTML code from say my homepage in there, it doesn't look right in the browser. All I want to do is take my current HTML code or current site and use it with this asp stuff. I have found nothing that discusses in any textbook or on any website how you use asp.net with an existing incomplete website. As I stated the site lacks my buttons to add items to shopping cart and it lacks working with the form that I have. Everything else is done. I find that if I am unable to import the existing I am going to have to start all over again and build the site from scratch using asp.net which I do not want to do. There has to be a way that developers do this because I can't imagine a developer building something from scratch simply to use asp.net. That would be a waste of resources. Any guidance would be appreciated and I can stop pulling my hair out. Thanks!!!!
|
|
|
|
|
tinamiller wrote: how you use asp.net with an existing incomplete website.
You can't if it's not an ASP.NET site.
tinamiller wrote: because I can't imagine a developer building something from scratch simply to use asp.net
We do our research and choose the right language before we start. You're saying, if I write a book in English, surely there's a way to make it French, b/c no-one would rewrite it, right ?
If your site is just HTML, then you can put your HTML inside aspx pages, because all web frameworks use html, by definition. However, it's still a manual process if you want to use ASP.NET in those pages.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
OK so I should create a new asp page and then input my code into that? I guess I just need to figure out where to paste it to. I mean what sections. Cuz I tried doing that in my html but it was very messy. So I need to find exactly the correct place to put it.
|
|
|
|
|
You need to create an aspx page, paste your HTML into it, then replace html elements with server controls if you want to interact with them in code behind.
Don't replace the whole page with HTML, you need to keep the page declaration, for sure. I am pretty sure there's a form tag you need to put all your HTML in as well, and obviously there's stuff in a normal HTML page you'd lose, like the head section and the page tag.
Basically, it sounds to me like you used a WYSIWIG tool to create a website, and you need to both better understand the resultant HTML, and learn about ASP.NET, before you'll be comfortable doing what you're proposing.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
I am working through the small business kit as a first project.
Uptil now I have been able to get things working as I needed, but this new page has me stuck.
I am adding a dictionary to one page; a panel with the alphebet on the left column, and the terms and definitions in the center column. Click the left column, and terms appear in the center.
The dictionary is in an XML file with categories and child terms, the schema should be correct.
Every example I can find is haveing either the page reload with a single item, or has each item load in a seperate details page.
Is it possible to target a panel with a querystring without reloading a age, or am I going to looking into AJAX for this?
|
|
|
|
|
HI,
I want to provide security to my website like
1. If he use back button then i need to expire the session
2. If he edietd the session then also i need to abandon the session
3. IF he entered other site url rather than my domain name i need to abandon the session
How can i do this can anyone help me regarding this.
Thanks,
Manoj
|
|
|
|
|
manoj22184 wrote: If he use back button then i need to expire the session
Handle the back button click using JS and redirect to other page which can kill the session. But keep it in mind, this is nasty.
manoj22184 wrote: If he edietd the session then also i need to abandon the session
Editing session ? How it is possible ?
manoj22184 wrote: IF he entered other site url rather than my domain name i need to abandon the session
Impossible.
|
|
|
|
|
ForumExpertOnLine wrote: Editing session ? How it is possible ?
Does he mean cookie tampering or something similar to
http://en.wikipedia.org/wiki/Session_hijacking[^]
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
All the world's a stage,
And all the men and women merely players.
They have their exits and their entrances;
And one man in his time plays many parts... --William Shakespeare
|
|
|
|
|
you can't do this
1 - any code that runs on the back button, is easily deleted
2 - how can someone edit the session when it runs on the server ?
3 - the session is actually orphaned when someone browses elsewhere and will time out of it's own accord.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
manoj22184 wrote: If he use back button then i need to expire the session
Keep using location.replace for all the links. That way, the back button can be rendered void.
manoj22184 wrote: If he edietd the session then also i need to abandon the session
If he tampers the session cookie, wouldn't the runtime itself abort the session? Also read this http://en.wikipedia.org/wiki/Session_hijacking[^]
manoj22184 wrote: IF he entered other site url rather than my domain name i need to abandon the session
Little difficult though not impossible. Try using a frameset of 0%, 100% and if he types the address in the address bar, the framesets would unload and you can fire a AJAX request to kill the sessions.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
All the world's a stage,
And all the men and women merely players.
They have their exits and their entrances;
And one man in his time plays many parts... --William Shakespeare
|
|
|
|
|
I am working with a home rolled custom gridview, no problems using it before, that allows for paging. I am using an AJAX tab panel and asp panel to contain the gridview. When I return a single record (in a generic list) and bind to the gridview all is well. The problem is that if I return multiple records and bind to the gridview, the gridview's width will extend beyond the boundaries of its containing panel to the side of the web page.
Thanks,
Steve
|
|
|
|
|
Note: My custom gridview is a subclass of the ASP gridview with paging added.
|
|
|
|
|
Hi,
I am using MasterPages in my project. It is working fine.
In some child pages MasterPage content(Images, MenuControl) is not visible. ChildPage Content(<asp:content... xmlns:asp="#unknown">) is overriding the masterPage content.........How to Avoid?
How to move the Content<asp:content.....>)control in child page?
Note: Most of the pages it is looking good but int two or three pages it is happening...
Thanking you
McMilan.
|
|
|
|
|
<%@ Page aspcompat="true"%>
<%
Dim cgiPath = "sessearch.cgi"
Dim scrName = Request.ServerVariables("URL")
Dim query = Request.ServerVariables("QUERY_STRING")
if query <> "" then
Dim url = cgiPath & "?" & query & "&wrap=" & scrName
Dim xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
Try
xml.Open("GET", "http://localhost/" + url, False)
Catch ex As Exception
Dim newUrl As New UriBuilder (Request.Url.Scheme, Request.Url.Host, Request.Url.Port, cgiPath & "?" & query & "&wrap=" & scrName)
xml.Open ("GET", newUrl.ToString, False)
End Try
xml.Send()
Response.write (xml.Responsetext)
end if
%>
|
|
|
|
|
Hi,
My project is in asp.net 2.0 with c#.
In my project I have to display Multi Column in a single dropdown.
like name and address on one dropdown.
Can any one tell me how i can do it.
thanks
|
|
|
|
|
|
Thanks for replying me.
i gone through that articles.
but i wont get solution exectly.
as they uses third party control.
also with that control i am unable to bind text value field.
actully i have to show some text and during saving it to data base i have to store value which is index field.
with third party control i am not getting it.
so that i am unable to solve my problem.
can u please help me.
|
|
|
|
|
I dotn think there is another way to do it
The dropdowlist is not really designed for multi columsn.
Why not try a different method like a listbox?
|
|
|
|
|
|