|
iam having a grid with some data in the cells of the grid.now i want the data in the cell should be starts leaving one space from the left
|
|
|
|
|
What do you mean by:
lakshmichawala wrote: leaving one space from the left
A whole cell or just a small space?
We are not a Code Charity
|
|
|
|
|
----------
abcdefg
----------
think this is a cell of a grid now i want the text should start with 1or two spacing from the left.when iam using cell pading it is getting applied to the complete cell
|
|
|
|
|
Hi ,
I am downloading a file with filename having french characters .
My code is like this ,
strFilename = "dossier de téléchargement.docx"
Response.AddHeader("Content-Disposition", "attachment;filename=""" &strFilename)
But when we are using Internet Explorer after downloading , the filename is converted to
'dossier_de_téléchargement.docx' .
Please help
Thanks in advance
Jophin
jophin
|
|
|
|
|
Try to use HttpUtility.UrlEncode to encode file name:
strFilename = HttpUtility.UrlEncode("dossier de téléchargement.docx");
|
|
|
|
|
hi Artem,
I tried this . Now the filename is proper but spaces are replaced by '+' signs. Is there any solution for that .Thanks in advance .Please dont consider my poor english .
Regards
Jophin
jophin
|
|
|
|
|
'+' is a valid replacement for space symbol(' '), quick way to fix it - use String.Replace :
strFilename = HttpUtility.UrlEncode("dossier de téléchargement.docx")
.Replace("+", "%20");
|
|
|
|
|
Hi Artem,
Thank you for the immediate reply .
But now I am using Server.UrlPathEncode() . It works fine.
Regards
Jophin
jophin
|
|
|
|
|
what is the main difference between Session and Profile. please explain.
tbhattacharjee
|
|
|
|
|
www.google.co.uk
We are not a Code Charity
|
|
|
|
|
Has Google blacklisted your IP and denying to serve you?
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
|
|
|
|
|
what is the mail difference between session and cache.....please explain.
tbhattacharjee
|
|
|
|
|
www.google.co.uk
We are not a Code Charity
|
|
|
|
|
Tridip Bhattacharjee wrote: mail
When you can not differentiate main and mail, I don't think you can understand the differences between Session and Cache.
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
|
|
|
|
|
hai friends
my project contains a word document , the text in it is same for all users ,only name of user and mail id will be varing
and i have to send this document to user mail id as an attachement file.
my problem is , i m able to write text to document file,but every time while writing text the document wii be opened i.e visible to user
it should not be happend..
my requirement is...
1)write text to word document but document should not be opend
2)and send it to user mail
plz solve this problem
thanks in advance
vijay
|
|
|
|
|
Hi,
For writing the content to a document here is the code:
string sText = "Hello Code Project";
string sFile = @"D:\Content.txt";
FileStream theFile = File.Create(sFile);
StreamWriter writer = new StreamWriter(theFile);
writer.Write(sText);
writer.Close();
theFile.Close();
For sending that as attachment here is the code: This has only the email attachment code since you asked specifically.
MailMessage oMailMessage = new MailMessage();
string sAttachedFile = @"D:\Content.txt";
Attachment oAtt = new Attachment(sAttachedFile);
oMailMessage.Attachments.Add(oAtt);
Refer this link to find out about the full code.
http://weblogs.asp.net/scottgu/archive/2005/12/10/432854.aspx
Thx,
Gayani
|
|
|
|
|
when i m running my site from net i get this javascript error..."sys is undefined"....and my ajax functiolaity is not working....i have inclued my script manager within form tag....and same web.config as in C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025.....please help
|
|
|
|
|
make sure your web.config has this:
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Assembly="Microsoft.Web.Preview" Name="Microsoft.Web.Resources.ScriptLibrary.PreviewScript.js" />
<asp:ScriptReference Assembly="Microsoft.Web.Preview" Name="Microsoft.Web.Resources.ScriptLibrary.PreviewGlitz.js" />
<asp:ScriptReference Assembly="Microsoft.Web.Preview" Name="Microsoft.Web.Resources.ScriptLibrary.PreviewDragDrop.js" />
</Scripts>
</asp:ScriptManager>
and you are not using a beta version
We are not a Code Charity
|
|
|
|
|
where should i include these lines
and i add the prefix tag atlas not the asp...because of some error
<pages>
<controls>
<add tagPrefix="atlas" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>
</controls>
</pages>
plesae tell me where/under which tag shud i include these lines in web.congif
|
|
|
|
|
after adding these lines in my aspx page...
<atlas:ScriptManager ID="scriptmanager1" runat="server" EnablePartialRendering="true">
<Scripts>
<atlas:ScriptReference Assembly="Microsoft.Web.Preview" Name="Microsoft.Web.Resources.ScriptLibrary.PreviewScript.js" />
<atlas:ScriptReference Assembly="Microsoft.Web.Preview" Name="Microsoft.Web.Resources.ScriptLibrary.PreviewGlitz.js" />
<atlas:ScriptReference Assembly="Microsoft.Web.Preview" Name="Microsoft.Web.Resources.ScriptLibrary.PreviewDragDrop.js" />
</Scripts>
</atlas:ScriptManager>
still i have the same error please help
|
|
|
|
|
I am having the same issue. Someone said try adding EnableEventValidation="false" to your Page directive.
This did not help me but it may help you
|
|
|
|
|
thanx that issue is solved..but still my ajax functionality is not working..........page is reload again and again....when any event of gridview is called(actually i use ajax on my gridview)..like display the complete detail of user on modalpopupextender.....but when modal popup is displayed....the page is reloaded......so if u can help me...the please..........
|
|
|
|
|
Hi
I've got a query which works fine in query analzyer but when I put it into my c# it shows the above eror message
Can you not use the following in c# sql string?
" FROM table LEFT OUTER JOIN" +
thanks!
We are not a Code Charity
|
|
|
|
|
You can use it for supplying the values for variables. Could you please post the full query so that it will be much more useful.
Thanks,
Meeram395
|
|
|
|
|
Hi
I am getting the above error message when I try and bind a stored procedure to a gridview:
string connectionString2 = ConfigurationManager.ConnectionStrings[project].ConnectionString;
SqlConnection con_room_code2 = new SqlConnection(connectionString2);
SqlCommand cmd_sofa = new SqlCommand("report", con_room_code2);
cmd_sofa.CommandType = CommandType.StoredProcedure;
cmd_sofa.Parameters.Add(new SqlParameter("@code", SqlDbType.VarChar));
cmd_sofa.Parameters["@code"].Value = Session["code"].ToString();
SqlDataSource1.ConnectionString = connectionString2;
SqlDataSource1.SelectCommand = cmd_sofa.ToString();
plreport.Visible = false;
plreport.Visible = true;
test.Text = Session["code"].ToString();
does any1 know why this is?
We are not a Code Charity
|
|
|
|