Solved

need help to mae a textbox visible in framesets

Posted on 2004-08-03
24
367 Views
Last Modified: 2012-05-05
hi guys .....
I got this website I made with 2 framesets in ......
both of the framesets uses vb.net asp forms .....
on the one I have a textbox and in the other I have an a button ....
now I want to to press the button on the one frameset to so that the textbox on the other frameset is visible .....
please help with examples with some comments to explain your ways ......

thanx
0
Comment
Question by:LordRipper
  • 14
  • 9
24 Comments
 
LVL 17

Expert Comment

by:AerosSaga
ID: 11707653
On Button Click Event

Me.Mytxtbox.visible = True

Regards,

Aeros
0
 
LVL 5

Author Comment

by:LordRipper
ID: 11707797
uhm ..... when I try this .... asp doesn't see textbox1 .... but only textbox2 and textbox4 witch is on the same webpage ..... and if I try to put the code directly in like "Me.textbox1.visible = True" well then there apears a line under the text and well I already know what the outcome will be ...... the error will say can't find object ....

but thanx for all you help today
ps...... dont you sleep ??? .... lol ..... seems like you and me are working the whole day
0
 
LVL 5

Author Comment

by:LordRipper
ID: 11707814
you must just excuse me for asking all these questions ......
I am new to visual stution.net .........
0
 
LVL 35

Expert Comment

by:YZlat
ID: 11707824
Dim myForm As Control = Page.FindControl("FormFrame1")
            myForm.myTextBox.Visible = True

put this code inside your button click event
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 11707864
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 11707923
0
 
LVL 5

Author Comment

by:LordRipper
ID: 11707993
Yzalt
I can't seem to get this way to work ....... but ill tell you wat I got .....
I got 3 webforms ...... the first is one that is just in html called chatA(this is to make the frames)
then I got another to one called chatB and chatC...... how must I implement your code
witch ones must I put where ???? ..... sorry to sound like an Idiot ..... but this part Page.FindControl("FormFrame1") must my frame name come in the "formframe" part ???
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 11708062
From Microsoft:

Private Sub Button1_Click(sender As Object, MyEventArgs As EventArgs)
         ' Find control on page.
         Dim myControl1 As Control = FindControl("TextBox2")
         If (Not myControl1 Is Nothing)
            ' Get control's parent.
            Dim myControl2 As Control = myControl1.Parent
            Response.Write("Parent of the text box is : " & myControl2.ID)
         Else
            Response.Write("Control not found.....")
         End If
   End Sub

Specifically for you:

Dim myControl1 As Control = FindControl"("MyTextBox")
mycontrol1.visible = true

Regards,

Aeros
0
 
LVL 5

Author Comment

by:LordRipper
ID: 11708108
Aerosaga .......
I avoid msdn websites as far as possible as where I am from going to ms websites take forever thats why I come to EE
but I will check the site .....



Ysalt & AeroSaga ...........
Today I was working on a phew web dev .... apps ..... as some of you might have noticed ....
and then I came up with the Idea to creat a chat site ...... I made the chatsite in 5 minutes with the knowlege that I earned here so the question I posted would be the last regadring asp( well I think)
but to share it with you ......
I created a asp webform(chata) with two framesets (charb & chatc) .....
I use textfiles to transfer the data wich is alomsot instand ...... but the only thing is that I the user must logg in and then the textbox in the one frame must become visible .......

but thanx for your help sofar  
0
 
LVL 5

Author Comment

by:LordRipper
ID: 11708163
thanx AeroSaga .... will try it quickly .... ;-)
0
 
LVL 5

Author Comment

by:LordRipper
ID: 11708212
Aerospark
whe I use your code on a button in my second webform I get the following error

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
System.NullReferenceException: Object reference not set to an instance of an object.

how can I fix this ???
0
 
LVL 5

Author Comment

by:LordRipper
ID: 11708220
ooo and the error is from this line
mycontrol1.visible = True

thanx
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 17

Expert Comment

by:AerosSaga
ID: 11708232
is there a mycontrol1.txtbox.visible?

0
 
LVL 5

Author Comment

by:LordRipper
ID: 11708262
well I got this code in under the button
        Dim myControl1 As Control = FindControl("textbox1")
        myControl1.Visible = True
0
 
LVL 5

Author Comment

by:LordRipper
ID: 11708337
if I use this
myControl1.TextBox1.Visible = True I get an compile error
0
 
LVL 17

Accepted Solution

by:
AerosSaga earned 500 total points
ID: 11708339
retype the mycontrol1. and when you hit the period see if you can find your textbox
0
 
LVL 5

Author Comment

by:LordRipper
ID: 11708386
ok I done that and I got the "visible" and I se it to true but still I got this error
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
System.NullReferenceException: Object reference not set to an instance of an object.
""sigh""  
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 11708600
0
 
LVL 5

Author Comment

by:LordRipper
ID: 11708724
ok ... .so its dificult and I did not get my question solved .....  and it seems that there is almost no way to get it done ........
though I think you can get the poitns ..... enjoy
and thanx for all the help
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 11708758
np, according to the last link I left it is not possible to do it like you want, sorry its not the answer you were looking for:

Regars,

Aeros
0
 
LVL 5

Author Comment

by:LordRipper
ID: 11708841
Hey ..... don't stress .... it ain't the end of the wordl ....... it was just an little extra I wanted to add ..... ;-)
0
 
LVL 5

Author Comment

by:LordRipper
ID: 11708870
hey .... say is there a way to make an framset bigger or smaller after pushing a button on the same frameset ???? .... this aught to do the trick ....
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 11708898
Give this a look, I don't see a size property, but it may offer yet another alternative:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxurfinsertframesetdialogbox.asp

Regards,

Aeros
0
 
LVL 5

Author Comment

by:LordRipper
ID: 11708935
Ok .... will have a look ...
thanks
Regards
Rudi
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now