• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 381
  • Last Modified:

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
0
LordRipper
Asked:
LordRipper
  • 14
  • 9
1 Solution
 
AerosSagaCommented:
On Button Click Event

Me.Mytxtbox.visible = True

Regards,

Aeros
0
 
LordRipperAuthor Commented:
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
 
LordRipperAuthor Commented:
you must just excuse me for asking all these questions ......
I am new to visual stution.net .........
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
YZlatCommented:
Dim myForm As Control = Page.FindControl("FormFrame1")
            myForm.myTextBox.Visible = True

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

thanx
0
 
AerosSagaCommented:
is there a mycontrol1.txtbox.visible?

0
 
LordRipperAuthor Commented:
well I got this code in under the button
        Dim myControl1 As Control = FindControl("textbox1")
        myControl1.Visible = True
0
 
LordRipperAuthor Commented:
if I use this
myControl1.TextBox1.Visible = True I get an compile error
0
 
AerosSagaCommented:
retype the mycontrol1. and when you hit the period see if you can find your textbox
0
 
LordRipperAuthor Commented:
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
 
AerosSagaCommented:
0
 
LordRipperAuthor Commented:
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
 
AerosSagaCommented:
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
 
LordRipperAuthor Commented:
Hey ..... don't stress .... it ain't the end of the wordl ....... it was just an little extra I wanted to add ..... ;-)
0
 
LordRipperAuthor Commented:
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
 
AerosSagaCommented:
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
 
LordRipperAuthor Commented:
Ok .... will have a look ...
thanks
Regards
Rudi
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 14
  • 9
Tackle projects and never again get stuck behind a technical roadblock.
Join Now