|
Hi
can u tel me how can i create instance of Attachment class.
Thanks.
Rahul
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
Hi Rahul!
Suppose "attachement" is a "StringBuilder" type then
ObjMail.Attachments.Add(new MailAttachment(attachement));
I hope this will help you..
Regards.
|
|
|
|
|
Hi
I have tried that but it gives following error message.
Out put can not produce a value
my code is for attachment is
emailAttach = New MailAttachment(Response.Write(oStringWriter.ToString())<br />
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
hi all
i m printing a .aspx page for that i m using
<br />
<script language="javascript"><br />
function Pprint()<br />
{<br />
<br />
var contents = document.getElementById("divprint");<br />
var printPage = window.open('','','left=5000,top=5000,width=1,height=1,toolbar=0,scrollbars=0,status=0, visiblity = hidden');<br />
printPage.visible = false ;<br />
printPage.document.write(contents.innerHTML);<br />
printPage.document.close();<br />
printPage.focus();<br />
printPage.print();<br />
printPage.close();<br />
<br />
<br />
}<br />
</script><br />
<br />
<br />
<input type="button" style = "background-color:darkGray;font-weight:bold;" id = "btnHtmPrint" value = "Print" onclick = "Pprint();" runat="server" /><br />
now how do i set page options in c# like page size, margin etc..
Amit Metkar
3i-infotech, Mumbai.
modified on Tuesday, February 19, 2008 5:39 AM
|
|
|
|
|
Amit.Amit.Amit... wrote: how do i set page options in c# like page size, margin etc.
You can't do that. Those are user specific settings in tbe browser.
The only possible way to programmatically change those settings would be to run an ActiveX control in the browser so that you could access the registry of the client computer.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I have this web page that displays fine with internet explorer but when you open the same web page in mozilla firefox the display becomes very bad and again if you open that same page using another screen resolution,you get a distorted web page very different from what you had.
Please do anybody have a solution to this problem?
|
|
|
|
|
The page is actually displayed correctly in Firefox, and incorrectly in Internet Explorer. It's a common misconception that Internet Explorer is the standard just because it's the most commonly used browser, but the standards are issued by W3C[^]. Although Microsoft is a member of this organisation, their browser doesn't do a very good job at following the standards.
There is no easy solution. You have a page that relies both on the rendering errors in Internet Explorer and a specific window size to render as intended. You have to rebuild the page so that it circumvents the rendering errors in Internet Explorer rather than relies on them.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hello Everybody,
I have an application where I have to store some values in Session variables.
And later on I need to use those values in a JavaScript function.
Can anyone tell me how to access Session values in JavaScript or some better approach to this situation..
HappyCoding
|
|
|
|
|
var sessionValue = <% Session["value"].ToString() %>
|
|
|
|
|
Hello,
Thanks Buddy...but its gives me the value undefined...
my code is as below.
(In JavaScript): var ImageUrl = <% Session["ImageUrl"].ToString(); %>
(In ASPX file): HttpContext.Current.Session["ImageUrl"] = "image" + "/" + "it-cover.jpg";
and In case of HiddenField how to do it?
HappyCoding
A key to every Solution
|
|
|
|
|
You need a single quotation (') around it. Try this
'<% Session["ImageUrl"].ToString(); %>';
|
|
|
|
|
It's impossible to access session variables from Javascript. The session variables never leaves the server.
If you want to use the value from a session varible, you have to copy the value from the session variable and put it in the generated html code, for example by outputting Javascript code that creates a variable that contains the value from the session variable, as Navaneeth suggested.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi all
I am learning MobileWebApplications
i created a web application it is working in my local system
but how can i publish to web i mean WAP
how can i convert my application to WAP
Thx in advance
keerthi
|
|
|
|
|
hi all,
iam adding rows to a datatable that i defined by code and then putting this datatable as gridview1 datasource:
gvSearch.DataSource = gridview1<br />
gvSearch.DataBind()
after binding the gridview1 is not loading anything but if i defined a new gridview by code and binded it, it will load the datatable.
My aim is to add a new row to a datatbale and let the user see the added coulmns in a gridview. Any ideas.
|
|
|
|
|
|
Gridview1 is a gridview created at design time.
<br />
If ViewState("dtSearch") Is Nothing Then<br />
dtSearch.Columns.Add("Table")<br />
dtSearch.Columns.Add("Field")<br />
dtSearch.Columns.Add("Operator")<br />
dtSearch.Columns.Add("Standard Table")<br />
dtSearch.Columns.Add("Value")<br />
dtSearch.Columns.Add("And/Or")<br />
End If<br />
<br />
'to maintain data<br />
' dtSearch = ViewState("dtSearch")<br />
Dim dataRow As DataRow = dtSearch.NewRow()<br />
<br />
dataRow(0) = radcTable.Value<br />
dataRow(1) = radcField.Text<br />
dataRow(2) = radcOperator.Text<br />
dataRow(3) = radcStandardTable.Text<br />
dataRow(4) = txtValue.Text<br />
dataRow(5) = ddlAndOr.SelectedValue<br />
<br />
If Not ViewState("dtSearch") Is Nothing Then<br />
dtSearch = CType(ViewState("dtSearch"), DataTable)<br />
dtSearch.Rows.Add(dataRow)<br />
Else<br />
dtSearch.Rows.Add(dataRow)<br />
End If<br />
<br />
ViewState("dtSearch") = dtSearch<br />
gvSearch.DataSource = dtSearch<br />
gvSearch.DataBind()<br />
|
|
|
|
|
my issue was solved by adding the gridview to a panel.
BUt another issue rised when attempting to set the datatble =viewstate when adding the second row.
I want to maintain the first row I inserted and add another row to the datatable
I tried 2 ways:
First way
dtSearch.columns.add()
dtSearch.columns.add()
dtSearch.columns.add()
For i As Integer = 0 To CType(ViewState("dtSearch"), DataTable).Rows.Count - 1
dtSearch.Rows.Add(CType(ViewState("dtSearch"), DataTable).Rows(i))
Next
Second way
dtSearch = CType(ViewState("dtSearch"), DataTable).Clone
in brief i want to maintain the result of datatable in viewstate and then add to this viewstate
NOT WORKING
|
|
|
|
|
The issue was solved
use the following code
Dim dtTemp As DataTable
dtTemp = CType(ViewState("dtSearch"), DataTable).Clone
For Each row As DataRow In CType(ViewState("dtSearch"), DataTable).Rows
dtTemp.ImportRow(row)
Next
|
|
|
|
|
Hi
I have a field in a database which is set as type Money.
However when I display this field in the gridview it just displays 0.0000
However in the database the value is 110.4000
Do I need to do some sort of conversion?
thanks in advance!
cheers
|
|
|
|
|
Hi guys
I have a gridview hyperlinkfield as show below:
<asp:HyperLinkField DataNavigateUrlFields="Item_Ref, Item_Description" DataTextField="Item_Ref" HeaderText="Item_Ref" SortExpression="Item_Ref" DataNavigateUrlFormatString="~/Main/RoomCompdets.aspx?firstvar={0}" Target="_new" />
How would i put into this code above the following code:
"window.open (this.href, 'popupwindow','width=850,height=700,scrollbars,resizable');return false;">
thanks in advance!!
|
|
|
|
|
Hello,
I want to call a crystal report from my .aspx webpage. I am using ASP.Net 2.0 and VB.Net
In my criteria, data will come in the crystal report from the stored procedure and I have to send the parameter to stored procedure.
Any help in this regard will be appreciated.
Thanks.
|
|
|
|
|
Following is the code i am writing to bing the gridview with the temporary table while updating the grid row.
TextBox quan = (TextBox)GridView1.Rows[e.RowIndex].FindControl("equan");
dt.Rows[e.RowIndex].ItemArray.SetValue(quan.Text, 4);
GridView1.EditIndex = -1;
GridView1.DataSource = dt;
GridView1.DataBind();
but the code is not updating the grid
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
Hi Sonia,
it is not clear to me what you exactly want.
TextBox quan = (TextBox)GridView1.Rows[e.RowIndex].FindControl("equan");
shouldn't this be something like
TextBox quan = ((TextBox)GridView1.Rows[e.RowIndex].FindControl("equan")).Text;
Do you have AutoGenerateColumns = true in you ASP GridView?
Was GridView1.EditIndex set to e.RowIndex before TextBox line?
|
|
|
|
|
Hi All
Please help me, I have been battling with the below task for sometimes now, I hope I will get help.
Here is what I am trying to do:
Create an excel file that a user can access from the internet, load in their browser, make changes, and save those changes to the file on the server, without having to download the file and FTP it back up?
I don't know if this is possible.
Thank you in advanced
khuzwayom
khuzym
|
|
|
|
|
No, it's not really possible.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|