|
What would happen if you redirect the user to the same page after you set the uiculture in the session?
The user wouldnt notice it
I know this would cause 2 requests, but if it works, you can use it meanwhile
Or you could use server.transfer
Alexei Rodriguez
|
|
|
|
|
Thanks dude, that worked fine!
Cheers,
Goebel
|
|
|
|
|
If you are not using querystring parameters on this page, id recomend you to use server.transfer instead of response.redirect
Alexei Rodriguez
|
|
|
|
|
Hi, thanks for looking
Im inheriting a page from another page (commonpage)
In my commonpage im just making sure that session hasnt expired before forms authentication ticket (Only in forms that need the user to be logged in)
In the load of commonpage i have:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Val(Session("UserID")) = 0 Then
FormsAuthentication.SignOut()
FormsAuthentication.RedirectToLoginPage()
End If
End Sub
In the pages that inherit from this common page, i also handle the load event, wich gives me an error, and i have to declare it overloads
Then i need to include a call to the base load
Protected Overloads Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
MyBase.Page_Load(Me, New System.EventArgs)
'do something else
End Sub
Do i have to alwasy include a call to the load event of the base class or is there any other way to inplicitly call the load event of the base class?
Thanks in advance
Any other approaches are welcome
Alexei Rodriguez
|
|
|
|
|
You do need to call the base method explicitly, that's for sure. Not sure why you need to do 'overloads', but I don't do VB.NET.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I am creating a Mail site.i have a third party smtp server, for sending emails in not an issue but how do i read a received mail in my smtp server.
coolsatty
|
|
|
|
|
Write a mail reading program. There's no automatic way to get them.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi, I know how to use Resource file to get the text and assign to server control; i.e. <%$ Resources:filename, key%>.
I have created resource file with keys:
Key value
-----------------
txtFirst => First
txtName => Name
txtLast => Last
In the DataGrid header i want to display "First Name", i.e. 2 resourse strings in single header.
Is there anybody who knows to access multiple resource strings in designer by using <%$ %>? not programatically.
Thanks
Regards
Aftab Sindhi
.NET Application Developer
U.A.E
|
|
|
|
|
I have a path of images in stored in a database now i want to show these images in gridview(or some thing like that) horizontally each row containing 5 images and if possible something about images below it the image should link to another page, how can i do this please help i got this working vertically( if the retrieving from database is done in codebehind its better) thank you.
Any help will highly appreciated
|
|
|
|
|
Two options
1 - get your datasource to return data in five columns
2 - use a repeater to get more control over how your data is shown
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Use a datalist and Set the RepeatColumns property to 5
Create a template for the datalist with:
One imageControl binded to the image path
One optionally Hyperlink binded to an ID and with a format of something like: Page2.aspx?ID={0}
Alexei Rodriguez
|
|
|
|
|
m stuck up with the code for online quiz.. i would like to get the code for online quiz in asp.net and vb
|
|
|
|
|
|
use your brain n write the code yourself :P
|
|
|
|
|
Hi everyone,
I am using a master page in my asp.net website. I would like the web content to align in the center like facebook for example. I am using the header and footer in the master page. How can I do it?
Thank you.
|
|
|
|
|
In the masterpage you will find the tag. Just add after tag and before tag.
IE:
|
|
|
|
|
Thanks for responding. But I didn't see the code. Can you write it again?
|
|
|
|
|
funny.
It is:
<body>< center >
Your code here
< /center ></body>
|
|
|
|
|
Thank you. I will try it.
|
|
|
|
|
in the treeview , at runtime , i want to change the font color of the treenode , in javascript , how should i do it , it is working very fine , in the server side, but this leads to postback.
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
modified on Sunday, April 6, 2008 4:08 AM
|
|
|
|
|
You will need to handle the event in javascript and set the css for the element that paints the node.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Look at the page source and find out how tree-view is getting rendered. Get those elements using JS and set the style property.
|
|
|
|
|
Hi
I have a web user control that I create dynamically and then add it to a panel like this:
<br />
MatchingControl control = (MatchingControl)LoadControl("MatchingControl.ascx");<br />
Panel1.Controls.Add(control);
I can deal with the control with no problems before page post back, but when the page is posted back to the server (in response to a button) I can't get the control like this:
<br />
MatchingControl control = (MatchingControl) Panel1.Controls[0];
Any one knows how to do it?
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
The control is gone. You need to recreate it every postback, and you need to create it before page load if you want it to have viewstate.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hey guys
i have a drop down box in my page which contains list of countries
how can i programmatically select a certain item by it's value?
for example i lke to select USA by it's value US
here is a part of my drop down box code:
<asp:DropDownList ID="drpSettingsCountry" runat="server">
...
<asp:ListItem Value="UG">Uganda</asp:ListItem>
<asp:ListItem Value="UA">Ukraine</asp:ListItem>
<asp:ListItem Value="GB">United Kingdom</asp:ListItem>
<asp:ListItem Value="US">United States</asp:ListItem>
...
</asp:DropDownList>
thank you
|
|
|
|