|
i am storing cookie object in my project. it is stored in cookies folder in system. it is stored with nam "test@localhost[1].txt". this is not understandable. actually i want to give some meaningful name to it. what to do for that?
|
|
|
|
|
Add the cookie manually
HttpCookie cookie = new HttpCookie("cookie1");//Sets the name of the cookie as "cookie1"
Page.Response.Cookies.Add(cookie);
Hope itll work fine for you...
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
i have an excel file at the server, if i press save button i need to save that file in my local system. how to do it? plz help me...
Pradeep Reddy
|
|
|
|
|
Give a url that will take to the Excel sheet open the Excel sheet in the IE When
a Pop up window will come if you save it will ask you path which is local save it there
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Hello to Every one,
There are two panel each containing a text box and and a button.
Panel1 including textbox1 and button1 & Panel2 including textbox2 and button2.
Now i want that after page_load if i select the textbox1 then entire panel2 should not be visible or vice-versa...
Can this is possible without using javascript as i donn't know it...
If not,could you give me The entire code in javascript for doing the above..
Suggest me....
Thank you.
|
|
|
|
|
Don't Repost.
Regards,
Satips.
|
|
|
|
|
Yes you can do it by using javascript.
Now Check Panel in the Brower by clicking right button and view code
i think Panel will get converted into span or similar to like that
Why are you using Panel ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
This is the folowwing coding i download from net...
But it is not working...
<asp:textbox id="TextBox1" tabindex="2" runat="server" width="165" height="24px" textmode="Password">
TextBox1.Attributes.Add("onkeydown", "if(event.which || event.keyCode)
{if((event.which == 13) || (event.keyCode == 13))
{document.getElementById('"+Usr.UniqueID+"').click();
return false;}}
else
{return true};
");
Suuggest me.. what problem is there
|
|
|
|
|
i doubt it contain both server side and Javascipt code in it
Don't use panel use div instead panel put your all controls in these div tags and in javascript write a function that will unable and visible div tags depending on which textBox clicked call this function
here register your javascript from page load in .cs
NameTxtBx.Attributes.Add("OnClick", "javascript:MakeSum('Second');");
AdressTxtBx.Attributes.Add("OnClick", "javascript:MakeSum('first');");
this is javascirpt function
function MakeSum( dats)
{
var tags=document.getElementById(dats);
if(tags.disabled==true)
{
tags.disabled=false;
}
else
{
tags.disabled=true;
}
}
here is the HTML
<div id="first">
<table >
<tr>
<td align="right">
<asp:Label ID="NameLabel" runat="server" Text="Name" Width="52px"></asp:Label></td>
<td>
<asp:TextBox ID="NameTxtBx" runat="server" ></asp:TextBox></td>
<td>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="LastNameLabel" runat="server" Text="LastName" Width="52px"></asp:Label></td>
<td>
<asp:TextBox ID="LastNameTxtBx" runat="server"></asp:TextBox></td>
<td>
</td>
</tr>
</table>
</div>
<div id="Second">
<table>
<tr>
<td align="right">
<asp:Label ID="AdressLabel" runat="server" Text="Adress" Width="52px"></asp:Label></td>
<td>
<asp:TextBox ID="AdressTxtBx" runat="server"></asp:TextBox></td>
<td>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="CityLabel" runat="server" Text="City" Width="52px"></asp:Label></td>
<td>
<asp:TextBox ID="CityTxtBx" runat="server"></asp:TextBox></td>
<td>
</td>
</tr>
<tr>
<td align="right">
</td>
<td>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" Width="70px" /></td>
<td>
</td>
</tr>
</table>
</div>
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Hi Hemant,
I think, it is not possible without java script. But it can be easily done by Java script.
If possible, dont use panel, use div for it.
Ash
|
|
|
|
|
This is the folowwing coding i download from net...
But it is not working...
<asp:textbox id="TextBox3" tabindex="2" runat="server" width="165" height="24px" textmode="Password">
TextBox3.Attributes.Add("onkeydown", "if(event.which || event.keyCode)
{if((event.which == 13) || (event.keyCode == 13))
{document.getElementById('"+Usr.UniqueID+"').click();
return false;}}
else
{return true};
");
Suuggest me.. what problem is there
|
|
|
|
|
Hi, All
I want to make a bitmap thats Each pixel has different Color.
I defined it size 1024,700 and used three nested Loops 0 to 255 to get unique color and setpixel sets this color to pixel. but my bmp file's pixel still contains duplicate colors,can anyone will guide me.
Thanks again, bye
<br />
int x=0,y=0;<br />
int tot = 0;<br />
Bitmap Bmp;<br />
Bmp = new Bitmap(1024, 700,PixelFormat.Format32bppPArgb);<br />
int h = 0;<br />
for (int i = 0; i <256; i = i + 8)<br />
{<br />
for (int j = 0; j < 256; j = j += 1)<br />
{<br />
for (int k = 0; k < 256; k += 1, x++, h++)<br />
{<br />
if (h > 255)<br />
h = 0;<br />
Color newColor = Color.FromArgb(255,i, j, k);<br />
Bmp.SetPixel(x, y, newColor);<br />
if (x == 1023)<br />
{<br />
x = 0;<br />
y++;<br />
}<br />
if (y >= 699)<br />
{<br />
try<br />
{<br />
Bmp.Save("bmp1.bmp", ImageFormat.Png);<br />
}<br />
catch (Exception ex)<br />
{<br />
Response.Write(ex.Message);<br />
}<br />
return;<br />
}<br />
}<br />
}
Bajrang Singh
Using .net 2.0 (VS2005)
|
|
|
|
|
Hi
Thanks to all of you.
I want to copy a folder with all the contents inside the folder and then paste in any other location or same location with different name. I need your help. pleasesuggest the way in c#. I have to implement this in web application.
Thanks in advance.
Shanti Bhushan
No Defeat Is Final Until You Stop Trying
|
|
|
|
|
|
Respected Gurus
I have an excel file which may contains more than 250000 records.I have to dump those reords in my database.I am able to do it,but its very very slow.
I have to optimize it.
For that i want to filter the records from excel file on the basis of a particular date.
I want to give the user flexibility of choosing the date,for which he wants to dump the data.How can i do this??
My sample code is:----
Dim StrReportdate As String
StrReportdate = Trim(txtDate.Value)
If StrReportdate <> "" Then
Dim culture = New CultureInfo("fr-FR", True)
dtreportdate = DateTime.Parse(StrReportdate, culture, DateTimeStyles.None)
End If
Dim strConnectionString As String = String.Empty
strConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strFilePath + ";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"""
Dim cnCSV As New OleDbConnection(strConnectionString)
cnCSV.Open()
Dim cmdSelect As New OleDbCommand("SELECT * FROM [sheet1$] where F2=" & dtreportdate, cnCSV)
'Dim cmdSelect As New OleDbCommand("SELECT * FROM [Sheet2$]", cnCSV)
Dim daCSV As New OleDbDataAdapter
daCSV.SelectCommand = cmdSelect
Dim ds As New DataSet
daCSV.Fill(ds)
|
|
|
|
|
Hello to Every one,
There are two panel each containing a text box and and a button.
Panel1 including textbox1 and button1 & Panel2 including textbox2 and button2.
Now i want that after page_load if i select the textbox1 then entire panel2 should not be visible or vice-versa...
Can this is possible without using javascript as i donn't know it...
If not,could you give me The entire code in javascript for doing the above..
Suggest me....
Thank you.
|
|
|
|
|
|
i have given solution on this and you again posting the same
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
hi,
i designed a login page in asp.net with vb.net. In that form i want to keep password strength meter, i dont have idea about that, i am new to .net
so, please help.I want the detail coding of it. plz help.
thanks
jai prakash
|
|
|
|
|
The Article by Roger Chapman here[^] will hekp you.
Regards,
Satips.
|
|
|
|
|
hi,
it is not working send me some other link
jai prakash
|
|
|
|
|
it works fine for me.
What error it says?
Regards,
Satips.
|
|
|
|
|
<google:passwordstrength id="PS" targetcontrolid="txtPassword" cssclass="password" runat="server">
hi,
this tag is not avilable in my html form because i am using asp.net 1.1
thanks
jai prakash
|
|
|
|
|
Hi All,
I am getting the following error whenever i try to throw an error in my web application. I have specified customErrors in web.config file like as follows:
<configuration>
<system.web>
<customErrors mode="On" defaultRedirect="CustomError.aspx"/>
<error statusCode="404" redirect="CustomError.aspx"/>
</system.web>
</configuration><pre><code>
Error:
<h2> Runtime Error </h2></span>
<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed.
<br>
Details: To enable the details of this specific error message to be viewable on the local server machine, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "RemoteOnly". To enable the details to be viewable on remote machines, please set "mode" to "Off".<br><br>
<pre>
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="On" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
Please let me know the solution.
Prakash G, Software Engineer
Iridium Interactive Limited,
SriNagar Colony
Road #3 Banjara Hills
Hyderabad - 500035
mail me @ prakash.se@indiatimes.com
call me @ +91 9866833523
|
|
|
|
|
Try this: (I am just doing hit and trial)
in the internet explorer, go to Tools --> Internet options -->Advanced:
Then untick the option for "Show friendly http error messages"
|
|
|
|