|
When I use the code you've suggested, I get the error '(' expected , right on the dot operator on the following line
Dim _buf() As Byte=CByte.Parse(_cmd.ExecuteScalar())
Also _buf is undefined on the line
Response.BinaryWrite(_buf)
Thanks again for helping.
-- modified at 1:12 Thursday 19th July, 2007
|
|
|
|
|
Hi All
How i can get the intelligence in VS 2005. e.g
i am using sqlcommand.ExecuteReader(commandbehavior.behavior).
So by using which keyboard keys combination i can get the different values for "commandbehavior.behavior"
Thanks!!
Amit
|
|
|
|
|
CTRL + J
Regards,
Sylvester G
If we don't succeed, we run the risk of failure
|
|
|
|
|
if you would like to get list of all classes, namespaces, properties etc without writing a letter then use CTRL+J.
If you write some object and after like "commandbehavior." and want different options then after "commandbehavior." you can press CTRL+Space
God Bless you.
Always do good to others
|
|
|
|
|
Hi
I have two different sites say www.domain1.com & www.domain2.com developed in asp.net 2.0. I want that user logs in www.domain1.com , and then clicks the hyperlink to www.domain2.com, then he should not be shown the login page of www.domain2.com.
some sample code will be of great help to me.
thanx
sandy
|
|
|
|
|
You can use generic priciple, which creates username and the roles assigned to him.
--When you redirect the user, pass the Context of first webpage through the URL to second page.
--In the second domain check the incoming URL, if there is any context, then validate it and
allow or deny user accordingly.
--Deny can redirect the user to Login page.
hope this helps, I have assumed that you know how the .net security works (Context, IIdentity etc).
|
|
|
|
|
RepliCrux wrote: When you redirect the user, pass the Context of first webpage through the URL to second page.
What do you mean by Context ? and how it can be passed with URL ?
|
|
|
|
|
When you Create Generic Priciple, You pass in all the roles to the Context of the page, then you check the user role like:
If(Context.Users.IsInRole("Manager"))
{
//Do Something
}
You cannot pass the whole context itself, but pass the contents of the Context, (IIdentity,Roles..etc), then create a new Generic Priciple in the destination page usring those values and validate the Context of the page simillarly.
|
|
|
|
|
That looks fine. But your previous message sounds like passing context object in URL. So I was confused.
|
|
|
|
|
hello sandeep,
Use ASP.NET Configuration tool for doing this.Here u can assign security,providers and roles etc ...By setting this change the code according in C#.net ..
ok byeee
Murali
Murali
|
|
|
|
|
Dear sirs:
I have an ASP.NET Web Form that uses a Master Page. On it, are several Web Controls (i.e. text-boxes, GridViews, etc.)
When I use a simple code-snippet like the following:
foreach (Control ctl in this.Controls)
{
Response.Write(ctl.ID);
}
... there is one control listed with an ID of "null..." However, I can, of course get the name of any control on the page with "this.<control_name>"
How can I iterate through the controls collection of this Web Form?
Thanks,
R. Hyland
|
|
|
|
|
Do you know which control it is that is coming back as null? If so, what is it's actual name?
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
Use the following code to obtain the control containing all of your forms controls.
Me.FindControl("ctl00").FindControl("contentMaster")) where "contentMaster" is referenced from your asp:content control located at the top of your aspx's source view page.
<<asp:content id="Content1" contentplaceholderid="contentMaster" runat="Server">
... form's html ...
Now you have a reference to the control containing all of the controls residing on the page.
Michael
I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious.
Vince Lombardi (1913-1970)
|
|
|
|
|
Thank you so much, your answer was spot-on!
R. H.
|
|
|
|
|
Hi Guys!
Did the stupidest thing - I got myself a new laptop with Vista business on it... and I cannot make the webserver work! Not great when I am supposed to finish that web app!
IIS 7.0 does install ( and de-installs) - I have tried that about 8 times. But I get an error 503 - service unavailable - even when I try top open a html file. The reason for this is that - looking at the event viewer - it cannot load compstat.dll.... the DefaultAppPool is stopped. I can re start it again but it dies again as soon as I try viewing http://localhost
Despair! Despair ! Despair!
Any help welcome - as Google does not seem to know much about compstat!
-- modified at 14:19 Wednesday 18th July, 2007
|
|
|
|
|
Is the compstat.dll file actually loaded at Windows\system32\inetsrv\compstat.dll?
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
Indeed it is! Is that serious, doctor?
|
|
|
|
|
I want to use SOAP request and resopnce. can any one suggest good site which will teach me step by step how to SOAP request in asp.net
|
|
|
|
|
hope this will give an idea for the soap request and response.
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
Hello everybody!
I can use ASP.Net Configuration with Visual Studio, but after uploading the site, how can I lunch it to manage my users?
somebody said: http://www.yoursitename.com/Webadmin.axd
but it end in : 404 error !
what should i do?!
|
|
|
|
|
The only way to manage the application is to build a controlpanel yourself. There are a lot of controls and classes available to do just that.
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
When you use default asp.net configuration. It generates database present in App_Data folder and write configuration related information in web.config.
You can use provider model of .net for user management. This model contains different classes to interact with the data base.
God Bless you.
Always do good to others
|
|
|
|
|
I am designing the custom control which contains a Panel. Panel header row contains some text, Imagebutton. That text and text for image button is passed through the Properties. For the Image button I need to add the click event when the user clicks on Image button I need to transfer to another page.
How to provide the Click event to Image button and how to fire the click event in custom control?
I can write like this:
public event EventHandler Click
TableCell c=new TableCell();
ImageButton i=new ImageButton();
i.text=//get text from one property.
i.Click += new EventHandler(this.ib_Click);
c.Controls.add(i);
Protected virtual void ib_click(Object sender, EventArgs e)
{
if (Click != null)
{
Click(this, e); //Click is the EventHandler
}
}
This event is not firing.
How to handle the event.
Thanks in advance
|
|
|
|
|
Where exactly are you constructing the tablecell and imagebutton controls?
The controls will need to be reconstructed everytime you load the page, including hooking up the event to the eventhandler. Best place to do this is in an override on the OnInit method of the control.
Hope this helps
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
Hi
I have the following code for assignin a value to a session from a datagrid Id field, i am tryin to extract the value out of the session in another page, but it doesn't appear to be workin
ANy suggestions
this is method which should set the session value
<br />
Sub getUser(ByVal sender As Object, ByVal e As DataGridCommandEventArgs)<br />
Dim iid As Integer = dgPriv.DataKeys(e.Item.ItemIndex)<br />
Session("userId") = iid<br />
Response.Redirect("userprofile.aspx")<br />
<br />
End Sub<br />
<br />
and this should extract the value and return the value in a messagebox<br />
<br />
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)<br />
getuser ()<br />
End Sub<br />
<br />
sub getUser()<br />
dim id as Integer <br />
Session("userId") = id<br />
<br />
msgbox(id)<br />
<br />
end sub<br />
Cheers boyindie
|
|
|
|