|
Hi Everyone,
How to remove the URLs in web printouts. Can anyone help me in this regard.
Regards,
Manowj
|
|
|
|
|
For Internet Explorer. go to page setup and empty the header and footer text box before printing
|
|
|
|
|
Hi,
How to handle this through code?..
Regards,
Manowj
|
|
|
|
|
Hi,
I'm not sure if this is possible at all, but my intention is to use the gridview to display the data in it in two columns next to eachother. Lets say i have just a string in my databinding and 10 rows. Then i wish to display it like this:
row1 | row2
row3 | row4
row5 | row6
row7 | row8
row9 | row10
But as the gridview is making a table this cannot be done it seams. I have tried using itemtemplate and alternatetemplate but with no success as the gridview after each row inserts a new tr / td and ending thesame at the end.
Is there anyway this can be done with the gridview or do i need to use repeaters and make my own paging for that?
Thanks
Daniel Tiru
|
|
|
|
|
Yeah it is possible. Iterate through the results of your query. And convert each set of two rows into one. Then bind to the datatable. I didn't test the following code but you should get the idea.
<br />
DataTable dt = new DataTable();<br />
DataColumn dc = new DataColumn("RowOdd", Type.GetType("System.Int32"));<br />
DataColumn dc1 = new DataColumn("RowEven", Type.GetType("System.Int32"));<br />
dt.Columns.Add(dc);<br />
dt.Columns.Add(dc1);<br />
<br />
Int16 Count = 0;<br />
DataRow r;<br />
while (YourDataReaderObject.read())<br />
{<br />
<br />
if (Count = 0)<br />
{<br />
r = dt.NewRow();<br />
r["RowOdd"] = dr.GetInt32(0);<br />
Count = 1;<br />
}<br />
else<br />
{<br />
r["RowEven"] = dr.GetInt32(1);<br />
dt.rows.add(r);<br />
Count = 0;<br />
}<br />
<br />
}
I didn't get any requirements for the signature
|
|
|
|
|
Thanks, i get the general idee, i have used the click/drag/drop functions in VS with data but that should i figure out how to do...
But one thing more... as i in reality have more than one column, is this the right aproach?
DataTable dt = new DataTable();
DataColumn dc = new DataColumn("RowOdd", Type.GetType("System.Int32"));
DataColumn dc1 = new DataColumn("RowOdd1", Type.GetType("System.Int32"));
DataColumn dc2 = new DataColumn("RowOdd2", Type.GetType("System.Int32"));
DataColumn dc3 = new DataColumn("RowEven", Type.GetType("System.Int32"));
DataColumn dc4 = new DataColumn("RowEven1", Type.GetType("System.Int32"));
DataColumn dc5 = new DataColumn("RowEven2", Type.GetType("System.Int32"));
dt.Columns.Add(dc);
dt.Columns.Add(dc1);
dt.Columns.Add(dc2);
dt.Columns.Add(dc3);
dt.Columns.Add(dc4);
dt.Columns.Add(dc6);
I think that should be fine... (I realized when writing the code)
Thanks alot
Tiru
|
|
|
|
|
Yes, that looks correct to me.
And you're welcome.
I didn't get any requirements for the signature
|
|
|
|
|
As an alternative you could use a DataList and use its RepeateColumn feature.
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
Hi, yes thats true, didnt know about that one... but the downside is that i then have to make my own pager... A bit to overkill for me at the moment i think.
Thanks
/Tiru
|
|
|
|
|
Can any body help me out with the memorystream...I ve to use that for XML parsing.. I need to know when why and how to use the same with a simple example.
Thanks in advance
Vijay
|
|
|
|
|
Look in MSDN as a start: MSDN link
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
Hi
I have a Menu (contains submenus) in my page which is used as just like tabs in VB, with which I want to make it work by hiding or unhiding the panels (panels contains the controls) through its (Menu) click event.
The problem is that, the click event is not raising. I have tried with the event handler
protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)
{} as I am using C#, but it did not work.
There is property added OnMenuItemClick="Menu1_MenuItemClick" in the menu tag in page1.aspx file.
How can I do this? Please suggest...
|
|
|
|
|
Hello
I have solved this problem.
Thanks.
regards
|
|
|
|
|
I have developed an application but i have some trouble with browser history .So i need your help please, but i don't know how to upload my app for you. I 'm waiting your anser soon, thank so much
my email: lequison@hotmail.com
note: please forgive my bad english , i 'm living in vietnam
|
|
|
|
|
hoangdung19832004 wrote: So i need your help please, but i don't know how to upload my app for you
There's no need to, just tell us what the problem is, and show us the code that relates directly to your problem
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hello Mr Christian Graus
but i don't know how to decribe my problem for without my app so, if i cant send to you my app to reference, it is better. If you afraid, ok i will not disturb you
thank so much
|
|
|
|
|
Im adding textboxes in my asp.net page on button click inside a panel,which i have placed in my page.
but the new control is getting created ,Im losing the old dyanmically create textbox.here is my code.
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
i = Convert.ToInt16(Session(ID))
Dim textbox As New TextBox
textbox.ID = "textbox" & i
textbox.Text = textbox.ID
textbox.Style("top") = "800px"
Panel1.Controls.Add(textbox)
i = i + 1
Session(ID) = i
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Page.IsPostBack = False Then
Session(ID) = i
' MsgBox(Session(ID))
Else
' MsgBox("2")
End If
End Sub
dont know what is the mistake Im doing.Possibly its anything to do with Viewstate?
Thanks in advance
|
|
|
|
|
A textbox that is added dynamically, needs to be added on every postback, or it will disappear. It also needs adding prior to the load event, if you want to interact with it using viewstate, or get events from it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I want to add and modify no. of products in my AddToCart variables.
Shopping can be done in different sub - domain.
Plz Help me...
Thanks
ajai
|
|
|
|
|
There's no such thing as a 'cart variable'. You don't want to store the number of products anyhow, you want to calculate it based on the number of products that are in the cart.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi all,
When i select a file to upload in the file upload control, I am not able to see the file name in the control after i selects the file. For eg: Suppose if i select a file from desktop, then in the file upload control i can see only "C:\Documents and settings", where i am not able to see the file name by default.
Here my requirement is after i select the file to upload, I want the cursor to be get focused to the last in the control. So that I can see the file name as "\Desktop\Form.doc".
Thanks and Regards,
Hariharan C
|
|
|
|
|
For security reasons, you don't have granular control over the Input Type File control.
|
|
|
|
|
I don't think you can interact with the filename control in javascript, because it has access to the file system, and javascript does not. Also, it stops you from putting such a control on a page, using javascript to put a path like c:\windows\somesensitivefile.doc into it, and getting files from people's computers.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
What's strange ? The requirement is not strange, and that it can't be done isn't strange, either.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
how can i improve speed of executing a thread in asp.net.
(not priority)
-- modified at 8:01 Thursday 16th August, 2007
|
|
|
|