|
I am having a usercontrol say address.ascx with a TextBox named txtStreet
Using the address.ascx Usercontrol in Register.aspx page Now my question is how to access the object "txtStreet" in Register.aspx Codebehind file
I think my question is clear now.
Ramya
-- modified at 0:50 Thursday 11th May, 2006
|
|
|
|
|
u can create properties for ur controls and eccess text property of that control, i mean that the place where u hv designed control control.ascx there make a public property
ex
public string Addresstext
{
get
{ return control.text;
}
set
{
control.text = value;
}
}
or if u wan't the whole control than you have to make attributes public which is not safe
there's another solution
use
System.Web.UI.Control.FindControl(string controlname)
USe Msdn to knw about it
it finds a control in a control nd returns it scanning by name
i hope ur querry has been answered
sameer sood
|
|
|
|
|
How can I display an image in the image box from a database (SQL Server2000) ?
Platform : VS.net2005( C# & ASP.net )
Data type in server: Image
Arpita
|
|
|
|
|
Well Hello Every One.
I am facing a problem on posting a client path eg:"c:/Name.doc"
using the javascript.
strFileName ="c:/Name.doc"
strScript = "javascript:void (window.open('" + strFileName + "','DocumentPreview'))"
But this give me a Access denied.As an error.
what is the best possible way to open the client path on browser.
Plz help me out by providing solution.
Thanks in advance.
Tirthesh Jain
|
|
|
|
|
As far as I am aware, standard javascript is not allowed access to a hard drive file system. To access a hard drives file system you will need to either use ActiveX objects or VB Script objects such as
for Javascripted ActiveX objects ...
function ShowFileInfo(filespec)
{
var fso, f, s;
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFile(filespec);
s = f.DateCreated;
return(s);
}
for VB Script ...
Function ShowDateCreated(filespec)
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile(filespec)
ShowDateCreated = f.DateCreated
End Function
But please note the security implecations of using above in a web page. Data above taken from MS JScript run-time reference and MS VB Scripting Edition Reference.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Thank's Abbottra for sending me your response.
I think it may solve the problem.If it is not than i get back to you for further help.
Thank's once again.
Tirthesh Jain
|
|
|
|
|
you should use the HtmlInputFile. I think in VS2005 is called HtmlUploadFIle.
Have them pick the file. You do not have access to the clients folders. And most people don't let ActiveX dll's run on thier machine
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
Thank's Ista for sending me reply.
Tirthesh jain
|
|
|
|
|
Hi,
I am developing web based application in asp.net.Actually I need the best solution or any idea of my problem.
I maintain user login time; log out time and how many times WebPages hit by particular user. Let us assume user hits result.aspx page 20 times, so I have to store 20 in the database. There are several pages in my application. I have done like this for each page when post back property is false then I update or insert in the database. But .each time I hit the database when page first time loads which effects on performance.. If any body have some idea or developed such type of application. Please help me.
Regards,
rajesh
|
|
|
|
|
for this u can use a session variable to store the number of times it was hit and after a certain number it can br reset to append the database value,also if u ask abt crashes then u can store in cookies as well as the Profile object can be useful(though it itself requires a database hit)
sameer sood
|
|
|
|
|
Thanks sameer,
I will try to use profile object.do let me know , profile object is available in asp.net v1.1 or not?
Again Thanks for help.
rajesh
|
|
|
|
|
|
I m using Windows Medai Encoder in ASP.NET .
I got the following error.
" Exception Details: System.IO.FileNotFoundException: The system cannot find the file specified."
But in Console application Coding works good.
In web, it gives this typeof error.
Anybody Help me. Plz
|
|
|
|
|
Hi all!
I want to create a watermark in Crystal Report like in MS Word but I don't know how. Can you show me how?
Thx!
|
|
|
|
|
I am looking for 3-tier web examples for either ASP & VB6 or ASP.Net environment.
Most examples treat the code as they are residing on the same machine.
I am looking for an example that treats 3-tier as client, business and data
layer residing on three different severs. I understand how to work with webservices. But I am looking for something like DCOM, COM+. Basically I want to know how an object on other machine (App server) is called from code running on webserver. How do you instantiate the object and what setup configuration is required.
Any direction is appreciated it.
|
|
|
|
|
|
I have a DataGrid in VS2005.
I have a link button being triggered.
I have a handler grabbing the ItemCommand event
When this is triggered the DataItem is null. Now the item index is correct and I could use the data source to find my row, but I want the DataItem to populate instead. Anyone know how?
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
I have 2 images lines vertically
Byut I dont want any oixels in-between them at all
I tried br and that didnt work
I tried at a table with 0 bottom and top margins. but that didnt work either.
Any ideas?
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
table with 0 cellpadding and 0 cellspacing...
|
|
|
|
|
I did that tool
div style="position:absolute; left:10px; height:50px;"
table cellpadding="0" cellspacing="0" width="128px"
tr style="margin-bottom:0px" valign="top"
td style="margin-bottom:0px; width: 129px; height: 71px;" valign="top"
asp:Image ID="ImageParchTop" runat="server" ImageUrl="~/parchment_v1.JPG" Width="128px" Height="100%"/
/td
/tr
tr style="margin-top:0px;" valign="top"
td style="margin-top:0px; width: 129px;" valign="top"
asp:Image ID="ImageParchBottom" runat="server" ImageUrl="~/section_parch_v1.JPG" Width="128px" Height="100%"/
/td
|
|
|
|
|
place two divs beside each other and just put the images in them. Use css to make the images block elements.
html:
<div class="ImageList">
<img .../>
<img .../>
<img .../>
</div>
<div class="ImageList">
<img .../>
<img .../>
<img .../>
</div>
css:
.ImageList { float: left; width: 100px; }
.ImageList img { display: block; }
---
b { font-weight: normal; }
|
|
|
|
|
thanks
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
Hi,
I've tried a simple app with a gridview, sqldatasource connected to Oracle.
On the Update COmmand i've wrote a simple query :UPDATE X SET field=77.
In SQLBUilder when i execute it it works just fine but from app i get this "ORA-01036: illegal variable name/number"
Can anyone help please ?
thanks!
|
|
|
|
|
you write query like:" UPDATE X SET field=77"
so as per your query,
Table Name : X
Field Name : field
so u must understand that "field" must be field name of table X. and datatype with any numeric.
try this.
Dipan Patel.
|
|
|
|
|
Hi and thanks you for your reply,
yes i understand.. the exact SQL is :
"UpdateCommand="UPDATE TABLOU SET STADIU=77"
the field called STADIU is type number. I've tried also with integer but i get the same error
-- modified at 17:40 Saturday 6th May, 2006
|
|
|
|