Question: I have a styled file Upload laying on top the vanilla asp.net fileupload control, which is hidden.
If the user comes back to edit his chosen files, there are buttons to view the file or delete it from the dataset; In addition the control is hidden.
However the fake fileupload remains visible.
I have written a custom method to call Jquery from Code behind, but I'm lacking the Jquery skills to hide this fake control and show it on demand.

The task is: Hide the fileupload which is contained in a and show it again if the user clicks on "remove file" & set the control to visible again, so he can choose another file.

Kind regards.

edit: the c# Method containing the Jquery code looks like this right now:

```
runjQueryCode(@"$(document).ready(function() {
                 $('#" + Btn_removeFile.ClientID + @"').click(function(){
                    $('.fakefile').show();
                    $('"+ fu.ClientID +@"').show();
                  });
                    $('.fakefile').hide();
                    $('"+ fu.ClientID +@"').hide();
                  });");

```

Answer: 
When you tilt the device your activity is destroyed and oncreate is called again .
You have to retain the value you want to get back when its is restarted.
There are several ways to do it .
In shortcut you can just add a flag in Activity in manifest file which is android:configchanges = "orientation".

```
<activity
            android:name=".Splash"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.NoTitleBar" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

```

Aur save your values in onPause or onBundleSaveinstance lifecycle callback methods.
you need to assign `android:screenOrientation="landscape"` in AndroidManifest.xml, look at following code, 

```
<application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".MainActivity" android:label="@string/app_name" android:screenOrientation="landscape" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

```