Click here to Skip to main content
15,887,267 members
Home / Discussions / Web Development
   

Web Development

 
QuestionHow to submit a POST with a WebRequest? (in C# to a PHP file) Pin
Super Lloyd23-Apr-07 15:35
Super Lloyd23-Apr-07 15:35 
AnswerRe: How to submit a POST with a WebRequest? (in C# to a PHP file) Pin
kubben24-Apr-07 2:16
kubben24-Apr-07 2:16 
Questioncan't create ASP.NET AJAX-Enabled Web Site in orcas Pin
Tsvi Girsh23-Apr-07 2:02
Tsvi Girsh23-Apr-07 2:02 
QuestionE-mail using javascript Pin
L Viljoen23-Apr-07 1:55
professionalL Viljoen23-Apr-07 1:55 
AnswerRe: E-mail using javascript Pin
badgrs23-Apr-07 2:19
badgrs23-Apr-07 2:19 
QuestionBUG IN PARAMETER OF ASP.NET 2.0 ? Pin
hifiger200423-Apr-07 1:52
hifiger200423-Apr-07 1:52 
AnswerRe: BUG IN PARAMETER OF ASP.NET 2.0 ? Pin
RichardGrimmer23-Apr-07 5:50
RichardGrimmer23-Apr-07 5:50 
GeneralRe: BUG IN PARAMETER OF ASP.NET 2.0 ? [modified] Pin
hifiger200423-Apr-07 6:48
hifiger200423-Apr-07 6:48 
Hi Richard,

Sounds like you're already know if what the problem is Smile | :)

Ok it's goes like this...
-------------------------------------------------------
First I have a table named tblTitle_Category and has only two fields - "PlayID" and "CatID".
And then I have also another table named tblCategories which contains only two fields - "CatID" and "Description".

tblTitle_Category:
PlayID CatID
1 1
1 2
2 3
2 4
3 5
3 6

tblCategories:
CatID Description
1 Liquid
2 Solid
3 Stone
4 Wood
5 Steel
6 Place

So, we have now a tblTitle_Category table and tblCategories table. And inorder to link them both, of course we need to join them using the Left Outer Join SQL Statement.

ASP.Net 2.0 Web Controls used:

1 - GridView, used for non editable records, only viewing purposes.
2 - DetailsView, used for inserting, editing and deleting of records.

GridView's SQLDatasource Statement:
Select tc.PlayID, tc.CatID, c.Description * From tblTitle_Category tc
Left Outer Join tblCategories c on tc.CatID = c.CatID

DetailsView's SQLDatasource Statement:

Select:
Select tc.PlayID, c.Description * From tblTitle_Category tc
Left Outer Join tblCategories c on tc.CatID = c.CatID

Insert:
Insert Into dbo.tblTitle_Category
(PlayID, CatID)
Values
(@PlayID, @CatID)

Edit:
Update dbo.tblTitle_Category
Set CatID = @CatID
Where PlayID = @PlayID and CatID = @CatID2

In my DetailsView I have a template for DropDownList for tblCategory.Description.

I have 3 parameters for editing existing record by just changing the tblCategory.Description thru the DropDownList.

Parameters:

@PlayID = From Other GridView source (I checked the value thru msgbox and the value is correct)
@CatID = TextBox1.Text (The value of TextBox1.Text is the CatID based on the DropdownList
selection that I passed).
Code below:

Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As
System.EventArgs)
TextBox1.Text = CType(sender, DropDownList).SelectedValue
End Sub

@CatID2 = TextBox2.Text (The value of TextBox2.Text is CatID based from the GridView's CatID)


And, that's all. It's very simple, isn't it? Smile | :)

But I really don't know if why the category can't be saved when I select another category from the DropDownList.

I am hoping that you can simulate this one, and I think you will get the same problem Smile | :)

By the way I am using MSSQL2005. Anyway, Access DB will do.

Thanks in advance.











-- modified at 12:59 Monday 23rd April, 2007

hifiger2004

GeneralRe: BUG IN PARAMETER OF ASP.NET 2.0 ? Pin
marky77723-Apr-07 23:24
marky77723-Apr-07 23:24 
GeneralRe: BUG IN PARAMETER OF ASP.NET 2.0 ? Pin
hifiger200423-Apr-07 23:29
hifiger200423-Apr-07 23:29 
GeneralRe: BUG IN PARAMETER OF ASP.NET 2.0 ? Pin
marky77723-Apr-07 23:37
marky77723-Apr-07 23:37 
GeneralRe: BUG IN PARAMETER OF ASP.NET 2.0 ? Pin
hifiger200424-Apr-07 2:04
hifiger200424-Apr-07 2:04 
QuestionDeveloping a new Site with FrontPage Pin
matjame22-Apr-07 23:03
matjame22-Apr-07 23:03 
AnswerRe: Developing a new Site with FrontPage Pin
Michael Hendrickx22-Apr-07 23:29
Michael Hendrickx22-Apr-07 23:29 
AnswerRe: Developing a new Site with FrontPage Pin
JimmyRopes27-Apr-07 19:10
professionalJimmyRopes27-Apr-07 19:10 
Questiondisplay data from database base on user input Pin
dheema22-Apr-07 22:58
dheema22-Apr-07 22:58 
QuestionReg web dialer Pin
NasimKaziS22-Apr-07 21:20
NasimKaziS22-Apr-07 21:20 
Questionjavascript to input masked date __/__/____ Pin
DineshSharmain22-Apr-07 20:49
DineshSharmain22-Apr-07 20:49 
AnswerRe: javascript to input masked date __/__/____ Pin
coolestCoder22-Apr-07 20:58
coolestCoder22-Apr-07 20:58 
Questionchanging a radio button programmatically Pin
JimmyRopes21-Apr-07 12:11
professionalJimmyRopes21-Apr-07 12:11 
AnswerRe: changing a radio button programmatically Pin
Fred_Smith22-Apr-07 0:29
Fred_Smith22-Apr-07 0:29 
GeneralRe: changing a radio button programmatically Pin
JimmyRopes22-Apr-07 2:24
professionalJimmyRopes22-Apr-07 2:24 
Questionemail probelm in php Pin
kumar bharat bhusanam21-Apr-07 5:51
kumar bharat bhusanam21-Apr-07 5:51 
AnswerRe: email probelm in php Pin
JimmyRopes21-Apr-07 12:22
professionalJimmyRopes21-Apr-07 12:22 
AnswerRe: email probelm in php Pin
Bradml22-Apr-07 3:04
Bradml22-Apr-07 3:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.