How to get values from dropdown with button?

I want to write a simple program. A Dropdown menu, a button and a Div is in the layout. I want to choose an option from the dropdown menu and then when I press the button the choosen value in the dropdown menu appears in the Div. My code below

import dash_bootstrap_components as dbc
from dash import Dash, html, dcc, callback, Input, Output, State

app = Dash(external_stylesheets=[dbc.themes.BOOTSTRAP])

layout_app = html.Div([
        dcc.Dropdown(['Choose Company', 'AAPL', 'MSFT', 'TXN', 'F', 'FB'], 'Choose Company', id='company_id'),
        dbc.Button('Generate', id='gen_button', className='me-2', n_clicks=0),

    Output('output_div', 'children'),
    Input('gen_button', 'n_clicks'),
    State('company_id', 'value')
def dropdown_value(value, n_clicks):
        return f"Value from Dropdown Menu: {value}"
        return f""

app.layout = dbc.Container(layout_app)

if __name__ == '__main__':

When I run this code I get a number not a value from the dropdown menu. What do I need to change in the code?

Hey @mahmoud899 , welcome to the forums.

Just swap the function parameters in you function. The order is reversed.