Showing posts with label value. Show all posts
Showing posts with label value. Show all posts

Thursday, March 29, 2012

Newbie - Passing Value From MasterPage to Search Page

Hi all,
(Using asp.net 2.0 VB)
I', newbie to this, my prolem is, i have my MasterPage with a search
field(and common to all pages), how can i pass this value to my search page
and then to the select statement of my sqldatasource.??

Thank's in advance,

Joao BatistaThis should answer your question about how to pass data between a page and a
master page:
http://SteveOrr.net/faq/PassDataToMaster.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"Joao Batista" <teste@.iol,pt> wrote in message
news:O4VSDXfRGHA.4300@.TK2MSFTNGP14.phx.gbl...
> Hi all,
> (Using asp.net 2.0 VB)
> I', newbie to this, my prolem is, i have my MasterPage with a search
> field(and common to all pages), how can i pass this value to my search
> page and then to the select statement of my sqldatasource.??
> Thank's in advance,
> Joao Batista

Newbie - Passing Value From MasterPage to Search Page

Hi all,
(Using asp.net 2.0 VB)
I', newbie to this, my prolem is, i have my MasterPage with a search
field(and common to all pages), how can i pass this value to my search page
and then to the select statement of my sqldatasource.'
Thank's in advance,
Joao BatistaThis should answer your question about how to pass data between a page and a
master page:
http://SteveOrr.net/faq/PassDataToMaster.aspx
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Joao Batista" <teste@.iol,pt> wrote in message
news:O4VSDXfRGHA.4300@.TK2MSFTNGP14.phx.gbl...
> Hi all,
> (Using asp.net 2.0 VB)
> I', newbie to this, my prolem is, i have my MasterPage with a search
> field(and common to all pages), how can i pass this value to my search
> page and then to the select statement of my sqldatasource.'
> Thank's in advance,
> Joao Batista
>

Newbie : aspx and javascript

Hello,
Is it possible to call an aspx page from an html page (via javascript)
and get some return value from the aspx? I want to get a string from
the aspx and add it to a div, something like :
myDiv.innerHTML += returnValueFromAspx;
Thanks in advance for the response.There are several ways, probably the easiest for a beginner is to use the
browser's built-in XMLHTTPRequest object, and get the string back in the
ResponseText proeperty. Then you just do
document.getElementById('myDiv').innerHTML= myXmlHttp.ResponseText;
Pete
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Bartlett" wrote:

> Hello,
> Is it possible to call an aspx page from an html page (via javascript)
> and get some return value from the aspx? I want to get a string from
> the aspx and add it to a div, something like :
> myDiv.innerHTML += returnValueFromAspx;
> Thanks in advance for the response.
>
Read this easy tutorial on Ajax
http://www.w3schools.com/ajax/default.asp
and check out the ajax section at
http://ajax.asp.net/default.aspx?tabid=47--
Regards
John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Bartlett" <stef_chr@.yahoo.fr> wrote in message
news:1164902904.001338.81740@.l12g2000cwl.googlegroups.com...
> Hello,
> Is it possible to call an aspx page from an html page (via javascript)
> and get some return value from the aspx? I want to get a string from
> the aspx and add it to a div, something like :
> myDiv.innerHTML += returnValueFromAspx;
> Thanks in advance for the response.
>

Newbie : aspx and javascript

Hello,

Is it possible to call an aspx page from an html page (via javascript)
and get some return value from the aspx? I want to get a string from
the aspx and add it to a div, something like :
myDiv.innerHTML += returnValueFromAspx;

Thanks in advance for the response.Read this easy tutorial on Ajax
http://www.w3schools.com/ajax/default.asp
and check out the ajax section at
http://ajax.asp.net/default.aspx?tabid=47--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Bartlett" <stef_chr@.yahoo.frwrote in message
news:1164902904.001338.81740@.l12g2000cwl.googlegro ups.com...

Quote:

Originally Posted by

Hello,
>
Is it possible to call an aspx page from an html page (via javascript)
and get some return value from the aspx? I want to get a string from
the aspx and add it to a div, something like :
myDiv.innerHTML += returnValueFromAspx;
>
Thanks in advance for the response.
>

Monday, March 26, 2012

Newbie combo question

Hi - I've loaded the values into a combo box at runtime, but can't see how I
set the combo to a certain value when the page loads. (The value will change
depending on other variables when the page loads.)
Thanks
NickArrest me if I'm wrong, but from what I know there is no ComboBox available
in ASP.NET
Are you using a Custom Control?
Shawn
"Nick" <Nick@.NTWorks.no.spam.fsnet.co.uk> wrote in message
news:eNGWFRV$EHA.3840@.tk2msftngp13.phx.gbl...
> Hi - I've loaded the values into a combo box at runtime, but can't see how
I
> set the combo to a certain value when the page loads. (The value will
change
> depending on other variables when the page loads.)
> Thanks
> Nick
>
I mean this one:
System.Web.UI.WebControls.DropDownList
Nick
"Shawn" <bossman100@.hotmail.com> wrote in message
news:ubG7qYV$EHA.1904@.TK2MSFTNGP14.phx.gbl...
> Arrest me if I'm wrong, but from what I know there is no ComboBox
> available
> in ASP.NET
> Are you using a Custom Control?
> Shawn
>
> "Nick" <Nick@.NTWorks.no.spam.fsnet.co.uk> wrote in message
> news:eNGWFRV$EHA.3840@.tk2msftngp13.phx.gbl...
> I
> change
>
If you are using .NET Framework 1.1 then you can use:
myDropDownList.SelectedValue
In .NET Framework 1.0 you can use SelectedIndex and then do a search for
your value, like this:
myDropDownList.SelectedIndex =
myDropDownList.Items.IndexOf(myDropDownList.Items.FindByValue(myValue))
or
myDropDownList.SelectedIndex =
myDropDownList.Items.IndexOf(myDropDownList.Items.FindByText(myText))
Hope this helps,
Shawn
"Nick" <Nick@.NTWorks.no.spam.fsnet.co.uk> wrote in message
news:uwNcZdV$EHA.1188@.tk2msftngp13.phx.gbl...
> I mean this one:
> System.Web.UI.WebControls.DropDownList
> Nick
> "Shawn" <bossman100@.hotmail.com> wrote in message
> news:ubG7qYV$EHA.1904@.TK2MSFTNGP14.phx.gbl...
>

Newbie combo question

Hi - I've loaded the values into a combo box at runtime, but can't see how I
set the combo to a certain value when the page loads. (The value will change
depending on other variables when the page loads.)

Thanks

NickArrest me if I'm wrong, but from what I know there is no ComboBox available
in ASP.NET
Are you using a Custom Control?

Shawn

"Nick" <Nick@.NTWorks.no.spam.fsnet.co.uk> wrote in message
news:eNGWFRV$EHA.3840@.tk2msftngp13.phx.gbl...
> Hi - I've loaded the values into a combo box at runtime, but can't see how
I
> set the combo to a certain value when the page loads. (The value will
change
> depending on other variables when the page loads.)
> Thanks
> Nick
I mean this one:
System.Web.UI.WebControls.DropDownList

Nick

"Shawn" <bossman100@.hotmail.com> wrote in message
news:ubG7qYV$EHA.1904@.TK2MSFTNGP14.phx.gbl...
> Arrest me if I'm wrong, but from what I know there is no ComboBox
> available
> in ASP.NET
> Are you using a Custom Control?
> Shawn
>
> "Nick" <Nick@.NTWorks.no.spam.fsnet.co.uk> wrote in message
> news:eNGWFRV$EHA.3840@.tk2msftngp13.phx.gbl...
>> Hi - I've loaded the values into a combo box at runtime, but can't see
>> how
> I
>> set the combo to a certain value when the page loads. (The value will
> change
>> depending on other variables when the page loads.)
>>
>> Thanks
>>
>> Nick
>>
>>
If you are using .NET Framework 1.1 then you can use:
myDropDownList.SelectedValue

In .NET Framework 1.0 you can use SelectedIndex and then do a search for
your value, like this:
myDropDownList.SelectedIndex =
myDropDownList.Items.IndexOf(myDropDownList.Items. FindByValue(myValue))
or
myDropDownList.SelectedIndex =
myDropDownList.Items.IndexOf(myDropDownList.Items. FindByText(myText))

Hope this helps,
Shawn

"Nick" <Nick@.NTWorks.no.spam.fsnet.co.uk> wrote in message
news:uwNcZdV$EHA.1188@.tk2msftngp13.phx.gbl...
> I mean this one:
> System.Web.UI.WebControls.DropDownList
> Nick
> "Shawn" <bossman100@.hotmail.com> wrote in message
> news:ubG7qYV$EHA.1904@.TK2MSFTNGP14.phx.gbl...
> > Arrest me if I'm wrong, but from what I know there is no ComboBox
> > available
> > in ASP.NET
> > Are you using a Custom Control?
> > Shawn
> > "Nick" <Nick@.NTWorks.no.spam.fsnet.co.uk> wrote in message
> > news:eNGWFRV$EHA.3840@.tk2msftngp13.phx.gbl...
> >> Hi - I've loaded the values into a combo box at runtime, but can't see
> >> how
> > I
> >> set the combo to a certain value when the page loads. (The value will
> > change
> >> depending on other variables when the page loads.)
> >>
> >> Thanks
> >>
> >> Nick
> >>
> >>

Thursday, March 22, 2012

newbie need help

Hi,
I need to know how to find out value being passed out is a string value or an integer value. I have a value being passed into objArgs.ListItem.value which has an integer value in first. Later when user clicks objArgs.ListItem.Value will be having a String value in it.

I need to capture both the values which it has in first and also later. Can anyone tell me how ??

I need some way to check if input is an Integer value or a StringValue !!!

ThanksOK, OK, I'LL TRY AND HELP YOU!!!

If you're using VB.NET then simply use the IsNumeric() method to check the value, and if you're using C# you can do this:

IsNumeric in C#

Friday, March 16, 2012

NEWBIE NEEDS HELP - pull value from sql table

I have searched this forum and can't find the answer to my question. I have a login page that validates username/password. I am validating that the username is in the sql table, but I would also like to return the rest of the information for that user to pass in a querystring. For example, the user ID . I have setup my sql string to select username, password, Name, and email. How do I pull the id from this dataset?


userDataset = myUserVAlidation(enterUsername, enterPassword)
If userDataset.tables(0).rows.count = 1 then
'found record in database table
ENd if

Function myUserValidation(ByVal username as string, byVal password as string)
Dim connectionString as ...
Dim sqlConn as system.data.sqlclient.sqlconnection = new system.data.sqlClient.sqlconnection(connectionSTring)
Dim sqlString as string = "Select [userTable][username], [userTable][password], [userTable][fullName], [userTable][id] where (([userTable].[username] = @dotnet.itags.org.username) and ([userTable].[password] = @dotnet.itags.org.password))"

Dim sqlCommand as system.data.sqlclient.sqlcommand = new system.data.sqlclient.sqlCommand(sqlString, sqlConn)

sqlCommand.parameters.add("@dotnet.itags.org.username", system.data.sqldbtype.varchar).value = username
sqlCommand.parameters.add("@dotnet.itags.org.password", system.data.sqldbtype.varchar).value = password

dim dataAdapter as system.data.sqlclient.sqldataadapter = new system.data.sqlclient.sqldataadapter(sqlCommand)
dim dataset as system.data.dataset = new system.data.dataset
dataadapter.fill(dataset)
return dataset

end function

To get the id you could use the following:
string id = userDataset.Tables[0].Rows[0].ItemArray.GetValue(3)
The index for GetValue = 3 because id is the 4th column returned from your sql statement.