|
@media print style? I am not familiar with that. Any samples?
thanks in advance. Much appreciated.
|
|
|
|
|
http://webdesign.about.com/cs/css/a/aa042103a.htm
|
|
|
|
|
Hi,
One thing you can do is ... generate table from the datagrid.
THis will give u a nice layout and perfect look of the print out.
Thanks,
Sushant Duggal.
|
|
|
|
|
A good idea. Thanks. Do you have any links? The method of generating it?
thanks in advance. Much appreciated.
|
|
|
|
|
|
Hi,
Yes you can use this code .. but it will be better to develop your own code .. as you can do this without using graphics(GDI+).
Just create a table from the datagrid (Generate DataTable) and use it
I hope it works,
THanks
Sushant Duggal.
Sushant Duggal.
|
|
|
|
|
Hai
I would like to use a free open source Data Block in my Web project. Can anyone suggest some good and excellent among them.
Thanks in advance
|
|
|
|
|
|
Hi
I have 3 frames Left, top and main content area - is there a way to force refresh of the left frame from the main content frame?
(all frames have a .aspx page)
thanks in advance!
|
|
|
|
|
try this
parent.leftFrame.window.location.reload();
Nav.
|
|
|
|
|
Does it support reload(), I am not sure, but I used to do something like this..
window.parent.frames[0].location.href='yourleftframe src.html'
|
|
|
|
|
Hi
I created a master page and put a treeview control in there on the left side table layout want to use the right side for different pages.
but the problem is i have a textbox and search button above the treeview and the treeview is loaded depending on what search string you type in. then i can click on a treenode and click a button on the top menu called addSubTreeNode - the right content panel should have a few text boxes for adding details of this TreeNode - but when i do this the treeview disappears - i want it to stay how it was on the mainpage.aspx - even when i goto this new addsubtreenode.aspx for adding a subTreeNode. (sort of like if i had frames and the treeview page remained the same - i want it to be in the same state as it was on mainpage.aspx when i natigate to addsubtreenode.aspx) (both these aspx pages are derieved from the master page and the treenode code is on the masterpage)
is this possible without frames?
thanks
-- modified at 19:14 Sunday 9th July, 2006
|
|
|
|
|
Hi,
I ran into this problem for the first time since I was working with .Net framework. You can't get (directly) to the query string of the page if your aspx is contained into a frame. It's possible to get it though the UrlRefferer object and to parse out the string.
My question is if you know some other way...
Appreciate it,
Cheers
|
|
|
|
|
Add the querystring to the URLs in the frame tags in the code in the frameset page.
---
b { font-weight: normal; }
|
|
|
|
|
Hey!
I am using framework 2.0 membership to handle my users on a site.
It is posible to get information like name, isInRole and so on. But i need to also get the id nr of the current user.
ex
Page.User.Identity.Name
I do not want to go to the mySQL server every time i need the id of a user, it shold be placed in session or cookie the same way the name is.
Is this posible? and if, how?
I am using a mySQL provider, what function is the mebership using to logon i user?
Best Regards
Jimmy
|
|
|
|
|
Hi,
I have a C# library created under VS2003 and stored in VSS. I now would like to create a version of that library targeted for the APS.NET 2.0 runtime under VS2005 but I am unable to figure out how to set things up so I can use one codebase stored in VSS. Does anyone have a suggestion on how best to maintain one body of code but compile two separate versions?
Thanks,
Rick
|
|
|
|
|
I'm not absoutely sure, but don't think it's possible - there are many MANY differences between 1.1 & 2 - just convert a project from one to the other and see the output report
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Richard,
Thanks for the reply. I haven't found any way yet either to share teh code between teh two solutions. But I DID find one interesting hack that will allow VS2005 to compile to 1.1 so you could in effect use the same solution to compile versions of both. For those that are interested, here's the URL:
http://blogs.msdn.com/jomo_fisher/archive/2005/04/22/410903.aspx[^]
Rick
|
|
|
|
|
hi all,
i have created an custom server control that is rendered, i.e., not a composite control that is built in CreateChildControls() . My control extends WebControl and i have wired up the ClientScript.GetPostBackEventReference() but this doesnt work if javascript is disabled, obviously.
so i also wired up the Click event of the buttons in my control as a failsafe, but they never fire. can anyone please help with this.
the control is huge, so i will try and post the relevant code below.
the control is a message box and i only need to be concerned with the button click events.
protected override void OnInit(EventArgs e)
{
if (Draggable)
{
Page.ClientScript.RegisterClientScriptInclude(
this.GetType(), "DragScript", Page.ClientScript.GetWebResourceUrl(this.GetType(),
"WebMessageBox.Resources.DragScript.js"));
}
RenderEmbeddedStyleSheet(null);
foreach (Button button in Buttons)
{
button.Attributes["onclick"] = Page.ClientScript.GetPostBackEventReference(this, button.Text);
button.Click += new EventHandler(Button_Click);
}
}
#region ButtonClicked event
protected void Button_Click(object sender, EventArgs e)
{
OnButtonClicked(new ButtonClickedArgs((Button)sender));
}
public delegate void ButtonClickedHandler(MessageBox sender, ButtonClickedArgs e);
[
Description("Fired when a button is clicked within the Message Box"),
Category("Button")
]
public event ButtonClickedHandler ButtonClicked;
protected void OnButtonClicked(ButtonClickedArgs e)
{
if (ButtonClicked != null)
{
ButtonClicked(this, e);
this.Visible = false;
}
}
#endregion
#region IPostBackEventHandler Members
public void RaisePostBackEvent(string eventArgument)
{
bool found = false;
Button button = null;
int i = 0;
while (i < Buttons.Count && !found)
{
Button b = Buttons[i];
if (b.Text == eventArgument)
{
found = true;
button = b;
}
i++;
}
if (button != null)
{
OnButtonClicked(new ButtonClickedArgs(button));
}
}
#endregion
kind regards,
g00fy
|
|
|
|
|
Hi there,
Does your custom control implement the INamingContainer interface in order for the postback event Click to be routed to the child button control?
|
|
|
|
|
yes it does,
public class MessageBox : WebControl, INamingContainer, IPostBackEventHandler
as posted earlier i am, adding the event handler in oninit(), do i also need to wire up the event in AddParsedSubObject() ?
regards,
g00fy
|
|
|
|
|
How do you add the child buttons stored in the Buttons collection? Do they get declared between the opening and closing tags of the custom control in the web page? or do you dynamically declare somewhere else?
|
|
|
|
|
the buttons are decalred in a button collection.
initially the button collection is instantiated like this
private ButtonCollection m_Buttons = new ButtonCollection();
[
PersistenceMode(PersistenceMode.InnerProperty),
DesignerSerializationVisibility(DesignerSerializationVisibility.Visible),
Editor(typeof(ButtonCollectionEditor), typeof(UITypeEditor)),
Category("Message Box"),
Description("The buttons that will appear on the Message Box"),
NotifyParentProperty(true),
RefreshProperties(RefreshProperties.All),
Bindable(true)
]
public ButtonCollection Buttons
{
get { return m_Buttons; }
}
in the MessageBox class. There is also an enum to designate a predifned set of buttons that works like this
private MessageBoxType m_MessageBoxButtons = MessageBoxType.YesNoCancel;
[
Category("Message Box"),
Description("The pre-defined type of Message Box you want to start with."),
DefaultValue(MessageBoxType.YesNoCancel),
Bindable(true),
NotifyParentProperty(true)
]
public MessageBoxType MessageBoxButtons
{
get { return m_MessageBoxButtons; }
set
{
m_MessageBoxButtons = value;
Button[] buttons = null;
Button button = null;
switch (m_MessageBoxButtons)
{
case MessageBoxType.YesNoCancel:
buttons = new Button[3];
button = new Button();
button.ID = "YesButton_" + DateTime.Now.Millisecond;
button.Text = "Yes";
buttons[0] = button;
button = new Button();
button.ID = "NoButton_" + DateTime.Now.Millisecond;
button.Text = "No";
buttons[1] = button;
button = new Button();
button.ID = "CancelButton_" + DateTime.Now.Millisecond;
button.Text = "Cancel";
buttons[2] = button;
m_Buttons = new ButtonCollection(buttons);
break;
case MessageBoxType.YesNoAbort:
buttons = new Button[3];
button = new Button();
button.ID = "YesButton_" + DateTime.Now.Millisecond;
button.Text = "Yes";
buttons[0] = button;
button = new Button();
button.ID = "NoButton_" + DateTime.Now.Millisecond;
button.Text = "No";
buttons[1] = button;
button = new Button();
button.ID = "AbortButton_" + DateTime.Now.Millisecond;
button.Text = "Abort";
buttons[2] = button;
m_Buttons = new ButtonCollection(buttons);
break;
case MessageBoxType.Custom:
Buttons.Clear();
break;
}
}
}
then in OnInit() i wire up the events like this, i also tried wiring up the event for the buttins during render, but that didnt work either.
protected override void OnInit(EventArgs e)
{
if (Draggable)
{
Page.ClientScript.RegisterClientScriptInclude(
this.GetType(), "DragScript", Page.ClientScript.GetWebResourceUrl(this.GetType(),
"WebMessageBox.Resources.DragScript.js"));
}
RenderEmbeddedStyleSheet(null);
foreach (Button button in Buttons)
{
button.Attributes["onclick"] = Page.ClientScript.GetPostBackEventReference(this, button.Text.Trim());
button.Click += new EventHandler(Button_Click);
}
}
the ButtonCollection class extends CollectionBase and overrides the standard functions (add, this[int], delete, clear etc) so it is strongly typed.
kind regards,
g00fy
|
|
|
|
|
There are a couple of things come to mind:
+ This code below makes the button's id not consistent:
button.ID = "NoButton_" + DateTime.Now.Millisecond;
so the event cannot be routed to the button properly.
+ Do you add these buttons to the parent custom control?
+ You have another option to fire up the custom event of the control by overriding the OnBubbleEvent method to capture the button's click event, then you can raise the custom event.
|
|
|
|
|
hey thanx for all your help
i didnt notice that ID property, that was redundant from something else i had done earlier.
I have made the following changes;
- fixed the buttosn ID property
- added each buttons to base.Controls (base == WebControl)
- overriden OnBubbleEvent()
i have left the call to base in the bubble event and tried to step through it but it never fires, any ideas.
protected override void OnInit(EventArgs e)
{
if (Draggable)
{
Page.ClientScript.RegisterClientScriptInclude(
this.GetType(), "DragScript", Page.ClientScript.GetWebResourceUrl(this.GetType(),
"WebMessageBox.Resources.DragScript.js"));
}
RenderEmbeddedStyleSheet(null);
foreach (Button button in Buttons)
{
base.Controls.Add(button);
button.Attributes["onclick"] = Page.ClientScript.GetPostBackEventReference(this, button.Text.Trim());
button.Click += new EventHandler(Button_Click);
}
}
protected override bool OnBubbleEvent(object source, EventArgs args)
{
return base.OnBubbleEvent(source, args);
}
btw when i get it going, do you need an ASP.NET 2.0 MesageBox control?
kind regards,
g00fy
|
|
|
|