|
i am using date time picker.i want to change the date format. currently it showing 1/23/2009 i want 1 jan,2009. its not showing date format property.it has reguler exp. "\d{1,2}\/\d{1,2}\/\d{2,4}" with it can we change the format of the date .. thnx..
|
|
|
|
|
that mean that date time picker does not allow you to change date format
why dont you use some other date time picker like gmd date picker which is free is fullfill your requirement..
umerumerumer
|
|
|
|
|
Hi guys,
I'm trying to do a file download for a user in ASP.NET. The method I'm using is writing the entire file to the Response the client gets. This approach works as expected in IE7 / Firefox / Etc. Unfortunately this approach crashes IE6. Locally on my machine (XP + IIS 5.1) it also works in IE6, but on the server machine (WIN2003 + IIS 6) it doesn't.
Response.Clear();
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentEncoding = System.Text.UTF8Encoding.UTF8;
Response.Charset = "";
Response.ContentType = "application/text";
sr_File = new StreamReader(file.FullName);
Response.BinaryWrite(new BinaryReader(sr_File.BaseStream).ReadBytes((int) sr_File.BaseStream.Length));
Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name);
Response.AddHeader("Content-Length", file.Length.ToString());
Response.Flush();
HttpContext.Current.ApplicationInstance.CompleteRequest();
sr_File.Close();
Any ideas are greatly appreciated!
Thanks!
|
|
|
|
|
From where you are getting this file? If it is not on database, all you need is to redirect to the file using Response.Redirect(FileToDownload) . You don't need all these coding.
|
|
|
|
|
That might work, but instead if I generate this file dynamically I should follow this approach that clearly doesn't work
|
|
|
|
|
I am trying to change the font size on a radio button !! i add data to the radiobutton threw a sql query. So the items are databound. But if i set the font size it stay by default 12, How will i be able to change the font size after the data has been bound to the Radio button ?
Thank you ....... i hope.
|
|
|
|
|
You might be using theme.
If yes, Do RadioButton.EnableTheming = false;
This should now work if you are setting the font-size correctly.
|
|
|
|
|
Hello,i want to store video and picture file with the unique user(the member or existing user)using SQL2000,the what relation will be suitable,[user table](PK--user_ID
User_Name,User_Password)[Resume table](PK--CV_ID, FK--User_ID,name,father_name ect)[Picture table](PK--Pic_ID, FK--CV_ID,picture,Content type,size,data)[Video table](PK--Video_ID, FK--CV_ID, Video_name,Content type,size,data) is this correct relation ship?and should i use user_id Fk in video and picture table?and also i want show the data for register member.
Please help me out as soon as possible(ali2k6@gmail.com)
|
|
|
|
|
I have the following line of code (.NET 2.0):
myDataView.RowFilter = "SELECT DISTINCT Auto";
where Auto is one of my column names. This throws the following exception:
Syntax error: Missing operand after 'DISTINCT' operator.
Any suggestions on what this is really trying to tell me?
krishna veer singh
|
|
|
|
|
|
write like select distinct(auto)
|
|
|
|
|
I try but its not working....
krishna veer singh
|
|
|
|
|
You can't have SQL statements in RowFilter expression. Please read[^] the documentation.
|
|
|
|
|
Good Morning All
Am working on a Setup Project. I have an Installer that write on the Web.config file like this
public override void Install(System.Collections.IDictionary stateSaver)
{
base.Install(stateSaver);
String MyServer = Context.Parameters["MyServer"];
String server = "Username=sa;Password=wow;Database=OBooking_Master;Server=" + MyServer;
String Key = "TESTY";
UpdateConfig(Key, server);
}
public void UpdateConfig(string strKey, string strValue)
{
Configuration objConfig = WebConfigurationManager.OpenWebConfiguration("~");
AppSettingsSection objAppsettings = (AppSettingsSection)objConfig.GetSection("appSettings");
if (objAppsettings != null)
{
objAppsettings.Settings[strKey].Value = strValue;
objConfig.Save();
}
}
Cool , now after i compile everything, testing my setup, i get an Error that says
The Application relative Virtual path '~' is not allowed here
i have tried the Following
Configuration objConfig = WebConfigurationManager.OpenWebConfiguration(HttpRuntime.AppDomainAppVirtualPath);
An i got an Error
Object reference not set to an instance of an object
And when i do it like this
Configuration objConfig = WebConfigurationManager.OpenWebConfiguration(@"~\Install_Helloworld\Web.Config");
and i got the Error Below on the Picture below.
In the CustomActionData Property i have this
/MyServer="[EDITA1]\"
Does it look ok for you?
Thanks
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
Hi, In my project i have to display a calendar according to the inputs. The inputs are Month and Year?. How it is possible to display the particular month of the year?
Can anyone help?
|
|
|
|
|
am working in online application if i click link button an excel document will open i user this but it shows some error..
protected void lnkbtn_Click(object sender, EventArgs e)
{
string filepath = MapPath("king.xls");
FileInfo myfile = new FileInfo (filepath);
Response.AddHeader ("Content-Disposition","inline; filename=" + myfile.Name);
if (myfile.Exists)
{
Response.ClearContent();
Response.AddHeader("Content-Disposition", "attachment; filename=" + myfile.Name);
Response.AddHeader("Content-Lenght", myfile.Length.ToString());
Response.TransmitFile(myfile.FullName);
Response.End();
}
}
send me suggestions...
|
|
|
|
|
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment");
Response.AddHeader("filename", "test.xls");
Response.ContentType = "application/vnd.ms-excel";
StringWriter oStringWriter = new StringWriter(new StringBuilder(pstrText));
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
HttpContext.Current.Response.Write(oStringWriter.ToString());
HttpContext.Current.Response.End();
use this code rather than yours...
This is working ...
In your code just replace the spelling of Length in content-length and take a look ... as well.
Abhishek Sur
|
|
|
|
|
string pstrText = "king.xls";
StringWriter oStringWriter = new StringWriter(new StringBuilder(pstrText));
error comes in stringbuilder
did i miss any assemble reference
|
|
|
|
|
add the
system.io and system.text namespace in your cs file
|
|
|
|
|
In my aspx page,I have a modal popup,on which there is a textbox and a button.
On click of the button(button_click()) ,I have written the code to save the textbox content to database.Everything seems like a simple scenario.
But somehow,when I click the button on the modal popup, it is not firing any event.
I have done the same thing on some other pages also and there it is working properly.
This is my design code :
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="addComment_lnk"
BackgroundCssClass="modalBackground" PopupControlID="Panel1">
</ajaxToolkit:ModalPopupExtender>
<asp:LinkButton ID="btn_hide" runat="server"></asp:LinkButton>
<asp:Panel ID="Panel1" CssClass="popBox" runat="server" Style="display: none">
<div>
<p style="text-align: center">
<table>
<tr>
<td class="title">
Post Comment :
</td>
</tr>
<tr>
<td>
<asp:TextBox ID="comments_txt" CssClass="popInput" TextMode="MultiLine" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Button ID="post_btn" CssClass="button buttonGreen floatRight" OnClick="post_btn_Click"
runat="server" Text="Post" />
<asp:Button ID="cancel_btn" CssClass="button buttonGray floatRight" runat="server"
Text="Cancel" />
</td>
</tr>
</table>
</p>
</div>
</asp:Panel>
<asp:LinkButton ID="addComment_lnk" runat="server">Add Comment</asp:LinkButton>
Can anyone please suggest any possible reasons for the button not firing event.
Thank You.
|
|
|
|
|
I have two modules in my project User Side and Admin Side. I want to Use Forms Autentication Only for Admin Module. How can i use Forms Autehntication Only for this. I Tried to Create a another web project for Admin Module. But when i compiling am getting the following error.
Error 1 It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Can i handle these two modules with the main web.config file. Or Should i create another web project like this, If it is then why this Error is coming.
|
|
|
|
|
set virtual path of the project mycomputer rc-manage-servies and application-IIS-websites-rc on ur website and new virtual directrey create new virtual directry.. and first of all put ur project folder in wwwroot folee which must be in c.in intpub folder.
|
|
|
|
|
am using .Net Framework 2.0 so it will automaticly create virtual directory, anyway i put my project files in wwwroot and compile from there eventhough still getting the same error
|
|
|
|
|
Dear All, I am using win vista and i have installed IIS with its all features.
when i am running .aspx files from vs 2005 its executed with no error, but i am running .aspx files from browser without vs 2005 it gives me the following error.
[Error]
Server Error in '/' Application.
BC30138: Unable to create temp file in path 'C:\Windows\TEMP\': Access is denied.
[Error]
and i should say that i am using Admin Account in vista.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Just go thru the below link
http://geekswithblogs.net/ranganh/archive/2005/05/13/39582.aspx
|
|
|
|