Showing posts with label select. Show all posts
Showing posts with label select. Show all posts

Saturday, March 31, 2012

Set as Start Page..

Quick question: when you select "set as start page" for an aspx file,what actually happens? In other words, what file does thatinformation get stored in?
Most likely the .csproj or .vbproj file. It has no impact when you deploy your app. Strictly used for debugging inside VS.Net
Strictly used for debugging inside VS.Net
Oh, okay. That's what I needed to know! Thanks!

If you look in your documents and settings folder, there is a VSWebCache Folder. Each web application will have a folder and in there you'll find a file like WebApplication1.vbproj.user that contains all the user settings like start page.

Tuesday, March 13, 2012

Set parameter value

I add a datasource to a page and configure it do insert and update to database table. I can see the select, insert and update commands and correspond parameters in the source file.

Now I need pass the values to the parameters. Most parameters value use form parameters. But there is one parameter value do not exist on the page and need to be set. But HOW?

The following seems the only code I can do which is "ADD" a parameter which already exists.

SqlDataSource1.InsertParameters.Add("UserId", userid)

Is there a simple way just set the value of the parameter?

SqlDataSource1.InsertParameters("UserId").value= userid 'DOES'T WORK

Ying

Is this VB? if it is C# then you could do this:

SqlDataSource1.InsertParameters["UserId"].value= userid;


actually, I meant:

SqlDataSource1.InsertParameters["UserId"].DefaultValue = userid

Set Select Control's Value from Querystring

This is probably very easy.
How do I set an HTML select control's value from the querystring?
This is what I have...but, only the select control's value doesn't get
set.
CustomerSelect.Value = Request.QueryString("cus")
StartDate.Text = Request.QueryString("Sdate")
This works...
StartDate.Text = Request.QueryString("cus")
Thanks,
j.t.wIf you just want a dropdown, consider the server controls rather than HTML
controls and then set selected value to the key value you wish. I can look
at the HTML control and probably guide there, but the server controls are
fairly straightforward.
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
****************************************
*********
| Think outside the box!
|
****************************************
*********
"j.t.w" <j.t.w@.juno.com> wrote in message
news:a9a2e312-6182-45b3-83b5-5298b955a785@.q78g2000hsh.googlegroups.com...
> This is probably very easy.
> How do I set an HTML select control's value from the querystring?
> This is what I have...but, only the select control's value doesn't get
> set.
> CustomerSelect.Value = Request.QueryString("cus")
> StartDate.Text = Request.QueryString("Sdate")
> This works...
> StartDate.Text = Request.QueryString("cus")
> Thanks,
> j.t.w
Try setting the SelectedValue or SelectedText properties.
"j.t.w" <j.t.w@.juno.com> wrote in message
news:a9a2e312-6182-45b3-83b5-5298b955a785@.q78g2000hsh.googlegroups.com...
> This is probably very easy.
> How do I set an HTML select control's value from the querystring?
> This is what I have...but, only the select control's value doesn't get
> set.
> CustomerSelect.Value = Request.QueryString("cus")
> StartDate.Text = Request.QueryString("Sdate")
> This works...
> StartDate.Text = Request.QueryString("cus")
> Thanks,
> j.t.w
>