|
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"
|
|
|
|
|
hi,
thank you. but i already tried the option u suggested. Even its not working. I restarted the IIS also. Still its showing the same error.
Let me know, if u find any other solution/way to solve the problem.
thank u once again
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
|
|
|
|
|
I think I remember, Go to the folder in Inetpub\wwwroot and give Network Service \ Asp.Net user permissions. Try this.
|
|
|
|
|
Hello,
I m also having the same runtime error but for only https:// pages, all other .aspx pages are working fine. Can any body guide me about how to use host server's Shared SSL certificate. What are the settings to be done for IIS of host server?
I have my web.config file as,
<securewebpages mode="On" maintainpath="True">
<files>
<add path="frmCustomerInfo.aspx" secure="Secure">
<add path="purchase.aspx" secure="Secure">
<add path="frmPayment.aspx" secure="Secure">
<add path="frmRegLogin.aspx" secure="Secure">
<add path="frmUsersInfo.aspx" secure="Secure">
<add path="frmDownload.aspx" secure="Secure">
here
secureWebPages mode="On" works as cutomerrors & I tried by doing it "Off" & "Remoteonly" also, but it is still giving error.
Thanks in advance.
by ULZ
|
|
|
|
|
Instead of using a .aspx page as the error page try having an html page as the error page.It might work.
Just try out..
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
Good morning,
I created class to send email. I use to send username in mail. I used _MailMessage.BodyFormat = MailFormat.Html
and body text is created through code containing html table for formatting purpose ex.
(" Name:txtname.text")
It is working fine......I can send mail with table format.
PROBLEM
but if I use
(" Name:Server.HtmlEncode(txtname.text)")
It gives error "object reference not set to an insatance of an object"
can I use Server.HtmlEncode in class file?
Anybody has any solution plz disscuss with me....
Thanks,
Nagraj
|
|
|
|
|
Hi,
I find out the solution......
I just replace "<" with "<" and ">" with ">" and remove Server.HtmlEncode
(" Name:ReplaceFunction(txtname.text)")
I hope this will help to solve same problem to somebody else..
Thanks....
Nagraj
|
|
|
|
|
Hi friends
i have button below in username.if i click the button the popup window appear
i have two button and one textbox in that popup window page
buttons are
1.check avilability
2.make this is my username
if i click the check avilability button that time check avilability button is disappear at that time make this is my username button appear vice versa
i write the code in codebehind using
check avilability.visible=true
make this is my username.visible=false
but page refreshed
i need the page did not refresh
how can i achive this
regards
saravanan
|
|
|
|
|
Dear saravanan,
you can use javascript instead of tht code in the code behind file
select a particular element and then you can set visible =false.
its like
document.getElementById('element_id').visible=false;
All The Best
Sathesh Pandian
|
|
|
|