|
hey jay,
it is exactly the same thing what i need . thanx alot
Deepti
|
|
|
|
|
I am not using Crystal Report in my report generation.
I just design the report on the web form and those datagrid will show on the web form.
Unfortunately, when the datagrid exceed more that a page, than i need to let it automatically show continue on the another web form with the same report format.
Will it be done just on the web form without using Crystal Report?
Any advice and suggestion? Thank You.;)
|
|
|
|
|
Hello,
I added, at runtime, a button field of type link to a gridview.
Now I need url of that button, when pressed, to be as follows:
"news.aspx?id=" & channel
"Channel" is the first column of my datasource which is linked to the gridview.
How can I do this?
Here is the code of my button:
Dim bIcon As New ButtonField
With bIcon
.ButtonType = ButtonType.Link
.ImageUrl = Me.GetLocalResourceObject("bIcon.ImageUrl").ToString()
End With
gvRSSChannels.Columns.Add(bIcon)
Thanks,
Miguel
|
|
|
|
|
Hello,
I created an Hyperlink field in a GridView but I can't find and
ImageUrl property.
I know normal Asp:Hyperlink control can also be used with an Image. Is
this possible in GridView?
Then I tried to use a button field but I can't see a way to build the
NavigateUrl as I need and as you can see in my Hyperlink button:
' Create, define and add url hyperlink field
Dim hfUrl As New HyperLinkField
With hfUrl
.DataNavigateUrlFields = New String() {"Channel"}
.DataNavigateUrlFormatString = "RSS.ashx?Channel={0}&" &
"Culture=" &
System.Threading.Thread.CurrentThread.CurrentCulture.ToString()
End With
gvRSSChannels.Columns.Add(hfUrl)
Could someone please help me out?
Thanks,
Miguel
|
|
|
|
|
In a small form there is an asp:Panel;
A botton dinamically adds a CheckBox to the panel;
The user checks the checkBox;
A second botton asks for the number o controls inside the panel (what cause a round trip to the server);
The answer is "none" meaning the CheckBox created previously did not persist:
Please, how to know if the user has ore has not checked the checkBox ?
Thank you very much in advance.
-------------------------------------------------------
PS: I have tried to add enableViewState=true to both checkBox and Panel - does not work
PS2: In case it helps, here os the code...
<%@ Page Language="vb" Debug="true" trace="true" %>
Sub cmdFills_Click (ByVal sender As Object, ByVal e As System.EventArgs)
Dim ckbBox1 As CheckBox = new CheckBox
ckbBox1.text = "Box 01"
ckbBox1.enableViewState = True
pnlTest.Controls.Add(ckbBox1)
pnlTest.enableViewState = True
Dim ckbBox2 As CheckBox = new CheckBox
pnlTest.Controls.Add(ckbBox2)
txtCount.text = pnlTest.Controls.count.toString() & " checkBoxes"
end sub
Sub cmdCount_Click (ByVal sender As Object, ByVal e As System.EventArgs)
txtCount.text = pnlTest.Controls.count.toString() & " checkBoxes"
end sub
Sub cmdChecked_Click (ByVal sender As Object, ByVal e As System.EventArgs)
txtChecked.text = "Checked?"
end sub
Sub ckbChanged (ByVal sender As Object, ByVal e As System.EventArgs)
txtChecked.text = "ckbChanged "
end sub
<title>New Page 1
Test PANEL
<asp:panel id="pnlTest" runat="server" backcolor="#FFFFCC">
<asp:button runat="server" text="Creates CheckBox" id="cmdFills" onclick="cmdFills_Click">
<asp:button runat="server" text="Count" id="cmdCount" onclick="cmdCount_Click">
<asp:textbox id="txtCount" runat="server">
<asp:button runat="server" text="Is Checked ?" id="cmdChecked" onclick="cmdChecked_Click">
<asp:textbox id="txtChecked" runat="server">
Ricardo COnte
|
|
|
|
|
Hi Ricardo. The issue is that the checkbox in question doesn't exist until you add it in code - and that will be long past the point where control properties and viewstate are addressed in the page cycle.
Here's an alternative you may like better. In your panel, declare your checkbox so it exists, but set its Visible property to false. When the appropriate condition occurs, set the checkbox Visible to true.
This way, the checkbox will always exist, its Checked value always persisted through ViewState, but it will only be visible to the user when you want it to be.
|
|
|
|
|
Thank you very much, Ellison, yours is a good idea, I will use it.
This time although I will not fit, my fault.
In fact I have a variable number of check boxes, one for each of a group of records, wich are, say 130+.
I was making a "check-list": some records are read, I create a box for each of them and hoped to find out wich ones the user had checked. When loaded first time the check boxes show the previous choice from the user.
The boxes are created in a post-back, in the "PostBackEvent". The check-boxes are beeing verified also in the post-back event, but in the NEXT post-back.
I thought the check boxes would persist between postbacks but it does not seam to be the case.
Do you know how to make the check boxes persist ?.
Thaks again, Ricardo
Ricardo Conte
|
|
|
|
|
Okay - you can still use the same idea here, even if you have to dynamically create your boxes. In your Page_Load code, you have to create all the checkboxes you may end up using in code, whether or not it is a postback. Again, with the checkboxes that should be unavailable with the visible attribute set to false.
Read through this article on the page/control lifecycle for some perspective on what is going on:
http://msdn2.microsoft.com/en-us/library/ms178472.aspx[^]
|
|
|
|
|
Solved ! Thank you very much for your help.
Let me tell you:
First I was doing:
1. created "n" check boxes inside a panel
2. user would "check" some
3. user would submit the form
4. I would not re-create the boxes thinking ASP.NET would persist the boxes... mistake ! I does not persist the boxes !
5. I would try to count the "checked" boxes, finding there were none !
The rigth thing to do:
1. firts create the boxes
2. let user "check" some
3. let user submit form
4. just create AGAIN the boxes ! (contrary to common sense) and ASP.NET will recognize that and persist the CONTENTS !
Ok, I gess it is a novice´s mistake...
Best Regards,
Ricardo Conte
|
|
|
|
|
What is a state in the life cycle of an ASP.net page similiar to Page_Load where I have access to my viewstate variables?
Because currently on my page, if I click a button which adds a variable tot he view state then, I check for that value in the corresponding postback, it isn't available - or I'm getting on old one.
I understand, the reason, because once I click the button the server posts back and page load is called.
I want to set a viewstate variable on my button click and be able to read it on the corresponding post back. How can I do this?
/\ |_ E X E GG
|
|
|
|
|
What do you mean by the corresponding postback? Is that the same as the same postback?
The Page_Load event occurs before the event for the button. The Page_PreRender event occurs after the event for the button.
---
b { font-weight: normal; }
|
|
|
|
|
I have a WebForm which contains many textboxes and a button.
When the button is clicked two things should occur:
1-execute a javascript function to validate all the text boxes(whithout any validator control).
2-execute an click handler method for this button which exists in the code-behind file.
Is it possible to use an <a> element as the button to perform the 2 actions I mentioned above?
I am too late but i will never give up
|
|
|
|
|
Attach a JavaScript function to validate the text boxes in the click event.
function func()
{
if(document.getElementById('textbox1').value=='')
{
alert('value is required');
return false;
}
if(document.getElementById('textbox2').value=='')
{
alert('value is required');
return false;
}
return true;
}
[Button].Attributes.Add("onclick", "func();")
When the button is clicked. First the JavaScript function is executed, and then with a post back the button execute the code behind function.
Thomas
|
|
|
|
|
|
Hi,
I m working on ASP.NET 1.1 & i m using DataList to display some of data with picture. As all the data is bounded by using DataBinder.Eval command into labels. It works perfectlly, but i m binding a Picture by defining it in code
Convert.ConvertType(DataListName.Item[index].FindControl("controlName"),typeof(Image)).ImageUrl
But this line creates error says .Image is ambigous
Any body can help me how to bind image from codebehind in the display list
KHATRI
|
|
|
|
|
http://www.programmingknowledge.com/ImageUpload.aspx
use
to show image on page
Response.BinaryWrite(imageData);
|
|
|
|
|
Well I have asked about shoing images in DataList..so do u think this will also work for DataList in C# caus i have tried this thing also..but it not works
I have got another solution ..but its not the proper way. any proper way to do it...
Any one can help me...
Khatri
|
|
|
|
|
I have the same problem to.. I use data binding where theres a path to import image and display it into Listbox. but in my listbox there's appear only my path of my image source. Help me..
|
|
|
|
|
Hello,
I have a control where MyControl.NavigateUrl = "~/RSS.ashx?Channel=News&Culture=pt-PT".
When I preview the web page the hyperlink becomes:
"...RSS.ashx"
The Channel and Culture just disappeared.
I tried many combinations and I allways get a truncate Query String somewhere in it.
Could somebody tell me what is going on here and how to solve this?
Should I change something in my Web.Config?
Thanks,
Miguel
|
|
|
|
|
Try giving path name like this
"../RSS.ashx?Channel=News&Culture=pt-PT".
or
"//RSS.ashx?Channel=News&Culture=pt-PT".
or if possible give the full path.Don't use this symbol "~"
|
|
|
|
|
Hi,
I am very new to web development...I have a strong background in networking. I have been tasked with creating an intranet for work. Anyway, my problem follows:
I created a form in Dreamweaver, using an ASP.NET VB page... I have a listbox that lists all of the values in a particular column in SQL. I want a datagrid to display the results of a query based on the item selected from the listbox. I created a dataset in dreamweaver as well. I am only able to make it work if I put "contains" in the filter criteria. If I put the value should be "equal to" the form it stops working. HELP Please ...
|
|
|
|
|
hello
iam working with asp.net and javascrito
i have some problems with me tecnical to work with javascript and as.net
for example
i have a form in the cliente and next in the even blur of id textbox i call with javascript a web services and this return answer for me all this in the cliente..
well i have the answer in the fiel hidden for next in the server side can read the value in this fiel hidden
imagin what i have a par of the call web services and thi same way of par return so i use many fiel hidden
it is bad technique
some one can guide me o have article about this
thanks for the time
|
|
|
|
|
In JavaScript, if I have an object, such as a select list, is there a way to determine its parent document, given that the object may exist inside of an iFrame?
I know that you can use the objSelList.form to get the parent form that the select list "lives" in, but I don't see a document attribute for the select list object or the form object, so I don't think I simply "walk" my way back to the parent document from just any sub-object.
I know that there is a forms object collection the document object, which could be searched for a match on the select's form attribute, but this would only work for the page's top level. Perhaps, I could have to "dig" into each iForm's contentDocument to see if a match could be made there. I haven't tested this yet.
But, is there an easier or better way?
|
|
|
|
|
I'm trying to create a combo box component in ASP.Net 1.0 using a text box and a select list (where size is greater than 1 so it shows as a list box) nested in an iFrame.
For the moment, I want to populate the select list with option items from an existing select list in the main page (the one that contains the iFrame). So I first wrote a JavaScript that can do this for select lists that both "live" in the main page:
function CopySelectList( SrcSelectList, DstSelectList ) { ... }
I currently am able to populate the DstSelectList by calling the function using a button with its OnClick event set to:
"CopySelectList( form1.SrcSelectList, form1.DstSelectList );"
Now I want modify this so that the destination select list can exist in an iFrame. So
I changed JavaScript call to:
"CopySelectList( form1.SrcSelectList, form1.iFrame1.contentDocument.form1.DstSelectList );"
But, this doesn't work. Is this the proper way to reference an object located in the form1 frame inside of the iFrame1 iframe?
|
|
|
|
|
Hello, I embedded a C# applet in my ASP.Net webpage. The applet needs access to the clients resources to perform some tasks (save a file & listen to sound card for speech buffer). Is there anyway for me to allow the applet to run on the client machine without the user on the client’s end doing too much work. I guess I am looking for something like a security certificate or something along those lines.
Thanks
Lawrence
|
|
|
|