Link to home
Start Free TrialLog in
Avatar of LordRipper
LordRipper

asked on

need help to mae a textbox visible in framesets

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
Avatar of AerosSaga
AerosSaga

On Button Click Event

Me.Mytxtbox.visible = True

Regards,

Aeros
Avatar of LordRipper

ASKER

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
you must just excuse me for asking all these questions ......
I am new to visual stution.net .........
Avatar of YZlat
Dim myForm As Control = Page.FindControl("FormFrame1")
            myForm.myTextBox.Visible = True

put this code inside your button click event
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 ???
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
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  
thanx AeroSaga .... will try it quickly .... ;-)
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 ???
ooo and the error is from this line
mycontrol1.visible = True

thanx
is there a mycontrol1.txtbox.visible?

well I got this code in under the button
        Dim myControl1 As Control = FindControl("textbox1")
        myControl1.Visible = True
if I use this
myControl1.TextBox1.Visible = True I get an compile error
ASKER CERTIFIED SOLUTION
Avatar of AerosSaga
AerosSaga

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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""  
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
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
Hey ..... don't stress .... it ain't the end of the wordl ....... it was just an little extra I wanted to add ..... ;-)
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 ....
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
Ok .... will have a look ...
thanks
Regards
Rudi