|
this is the class whose object i want to access
public class Class1
{
private TextBox txtname;
public TextBox Txtname
{
get
{
return txtname;
}
set
{
txtname = value;
}
}
}
here i m creating the object of this class on btnSave click and trying to access this object on btnGet click.....
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnsave_Click(object sender, EventArgs e)
{
Class1 obj = new Class1();
obj.Txtname = new TextBox();
obj.Txtname.Text = "mridul vishnoi";
obj.Txtname.Visible = true;
Page.Form.Controls.Add(obj.Txtname);
}
protected void btnGet_Click(object sender, EventArgs e)
{
}
|
|
|
|
|
Hi, to all
I have developed a project with asp.net 2.0. And there is a download link on books, i want to store how many times user download my books.
|
|
|
|
|
What I do is this.
My user selects a filename. To download that file hey must press a button-object.
In the OnClick Event I Check:
- Does the file Exist via FileInfo
FileInfo fi = new FileInfo(DownLoadFileName);
- FileSize larger then 0
if (fi.Length > 0)
{
arrParameter = new SqlParameter[3];
arrParameter[0] = new SqlParameter("@secUserID", Convert.ToInt32(Session["USERID"]));
arrParameter[1] = new SqlParameter("@reportName", Page.Title);
arrParameter[2] = new SqlParameter("@DownloadedFile", txtExcelFile.Text);
SyconosServer.dataBaseActieNonQuery("SE_InsDownload", arrParameter, String.Empty, "SesameNET31");
Response.Redirect(@"~/Export/DownLoadFile.aspx", false);
}
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
Good Afternoon All
I have a Control that looks like this
http://www.tiyaneproperties.co.za/fading_Control.JPG[^]
and this Control looks differently from versions of Internet explorer. In 7 and up it shows are the links shows you and in internet explorer 6 it shows the whole of it , if the list grows, it create scroll bars
Questions
What is the Reason to that ?
Thank you
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
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
I too find this kind of problem but bwn mozila and IE.
|
|
|
|
|
Were you able to Find a Solution ?
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
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
IE 6 behaves differently to IE 7 and above and Mozilla based browsers in respect to block-level element heights. In order to resolve your issue you will need to specify browser specific CSS to cope such as:
/* Style to target IE 6 */
.styleForListWrapper
{
height: 300px;
}
/* Override styles for IE 7 / Mozilla */
html>body .styleForListWrapper
{
height: auto;
min-height: 300px;
}
IE 6 allows block level elements to grow with their content whereas other browsers do not. Therefore specifying the min-hegith property will allow these other browsers to grow as required.
Hope this helps...
Clean code is the key to happiness.
|
|
|
|
|
Thank you Very much. i will try it
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
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Good Morning newc1
Thank you very much for your help.
It worked.
Vuyiswa Maseko
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
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi,
I have no clue how to start with credit card validation.
can anybody help?
|
|
|
|
|
Here you go Google[^]
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
|
hi !
i want to enter in text box only capital A to Z and number only, in web page for that i want java script .
|
|
|
|
|
Do you want a validator?? If so use regex to match the textbox value as follows...
<script language="javascript" type="text/javascript">
function ToUpper(ctrl)
{
var t = ctrl.value;
var expr = /^[A-Z0-9]+$/;
if(expr.test(t))
alert('passed');
else
{
alert('failed');
return false;
}
}
</script>
<asp:TextBox ID="TextBox1" onkeyup="ToUpper(this)" runat="server"></asp:TextBox>
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
Hi friends
I have source code ,its perfectly running internet explorer but an apple safari browser its not running ...why??
Thanks
|
|
|
|
|
What do you mean by "not running"? What doesn't work exactly?
|
|
|
|
|
I have one issue in my projects.im choosing any one of listitem from dropdown list before press the save button of my application, i had go back one page for that (firewox) browser.
after i had go forward one page of that browser,at that time the choosed listitemvalue was to be bind into the dropdown list.please any one person consider my issue as well as give the tips and coding for solving my problem.
|
|
|
|
|
Why do you have to go back one page?
Think about using the session variable.
|
|
|
|
|
You ought to better learn on how best to caption the subject of the message. Having a curt and blunt 'issues' for anything you post on the forums does not help taking you any longer.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
hello
I need to determine from within an iframe mouse click "location", by that I mean:
1. nPosition = # characters from start of HTML document (err... preferably start means first character of hTML doc in iframe) to first character of the selected text.
This gives you x/y position, which is not what we need ...
<br />
Browser = navigator.appName<br />
Net = Browser.indexOf("Netscape")<br />
Micro = Browser.indexOf("Microsoft")<br />
<br />
Netscape = false<br />
IE = false<br />
<br />
if(Net >= 0) {<br />
Netscape = true<br />
}<br />
<br />
if(Micro >= 0) {<br />
IE = true<br />
}<br />
<br />
function XYpos() {<br />
if (IE == true) {<br />
xPos = event.screenX<br />
yPos = event.screenY<br />
alert(xPos + " left " + yPos + " down")<br />
}<br />
else if (Netscape == true) {<br />
alert("Script won't work: " + "\n" + "You're using Netscape")<br />
}<br />
This retrieves the selected text, but (a) not the position {nPosition, nLength} of selected text and (b) not friendly with iframe.
<br />
function getSelText()<br />
{<br />
var txt = '';<br />
if (window.getSelection)<br />
{<br />
txt = window.getSelection();<br />
}<br />
else if (document.getSelection)<br />
{<br />
txt = document.getSelection();<br />
}<br />
else if (document.selection)<br />
{<br />
txt = document.selection.createRange().text;<br />
}<br />
else return;<br />
alert(txt);<br />
}<br />
From W3C doc (URL below), these information is available.
"mousedown
The mousedown event occurs when the pointing device button is pressed over an element. This event is valid for most elements.
* Bubbles: Yes
* Cancelable: Yes
* Context Info: screenX, screenY, clientX, clientY, altKey, ctrlKey, shiftKey, metaKey, button, detail"
Any suggestion? Thanks.
REF: http://www.w3.org/TR/DOM-Level-2-Events/events.html[^]
dev
|
|
|
|
|
I have aspx page containing dropdown, textbox,divs , panel and buttons
i have set the tabindex property of each control. when page load i set the focus on a drop down by using this function
Private sub Setfocus(Byval Ctrl as control)
Dim Fs as string ="document.getElementById('" + ctrl.ClientId + "').focus();"
Page.RegsisterStartUp("FOCUSSCRIPT",FS)
End Sub
Now when i press tab the focus goes on address bar first then comes to second control
What will be the reason??
Note: I am using ASP.Net 1.1
Please Help
Its Urgent
One person's data is another person's program.
--J.Walia
|
|
|
|
|
why dont you use ctrl.focus() property why you want to register startup srcipt.
actually focus goes to address bar only in the case when we start tabindex from zero..
locate in your code if you have set tabindex to zero. try to start it from 1 your problem will be sovled....
Government Dyal Singh College Lahore.
|
|
|
|
|
thanks
my problem is solved
One person's data is another person's program.
--J.Walia
|
|
|
|
|
whenever an exception happens, my browser reports this:
<br />
Server Error in '/' Application.<br />
Exception of type 'xxxxx.Util.ApplicationException' was thrown.<br />
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.<br />
<br />
Exception Details: xxxxx.Util.ApplicationException: Exception of type 'xxxxx.Util.ApplicationException' was thrown.<br />
<br />
Source Error:<br />
<br />
Line 175:<br />
Line 176: oExContext.Trace = new System.Diagnostics.StackTrace(true);<br />
Line 177: throw new ThinkFundamentals.Util.ApplicationException(ref oExContext, oInnerException);<br />
Line 178: }<br />
Line 179: }<br />
<br />
<br />
Source File: C:\dev\xxxxx\NET3.0\Util\ApplicationException.cs Line: 177<br />
<br />
Stack Trace:<br />
<br />
...<br />
System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +108<br />
System.Web.UI.WebControls.Login.AttemptLogin() +115<br />
System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +101<br />
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37<br />
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +118<br />
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +166<br />
...<br />
What I want to see most is ex.ToString() --- any chance I can see this on my browser? Perhaps through tweaking browser configuration? Or IIS config?
Thanks
dev
|
|
|
|
|
Implement your own custom error page. Handle the errors and report in a way you want. Read[^] this.
|
|
|
|