|
|
I Implemented it
but its not working
so any other solution, SIR
krishna veer singh
|
|
|
|
|
Hi,
I am a beginner in .Net.
In my application i have 4 panels.
But,during postback(such as a button click event),the focus automatically goes to the first panel.
In web,i found on idea to use TabbedPanels1.showPanel(tabindex) on button's onclick event.
But,both in the OnClientClick and OnServerClick events i have written the validation and some task to be done respectively.
How to persist the focus on the panel during postback?
Thanks in advance
Yazhini
|
|
|
|
|
YazhiniP wrote: But,both in the OnClientClick and OnServerClick events i have written the validation and some task to be done respectively.
You should always do validation on the server side, don't trust the client validation.
If there's no server side focus method to call, then you need to write javascript to do it.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Hi all ,
How i deal with the File Uplad control in View control . i placed the Fileuplaod control on view control .
Is Fileupload stored data in viewstate like others controls inside view control ?
Any Idea or link ?
Best Regards
|
|
|
|
|
Rameez Raja wrote: Is Fileupload stored data in viewstate like others controls inside view control ?
No. It's a html file input control, it's data is sent to the server, but it's not stored in viewstate.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Thanks for reply ,
It is server side control not the html file input control if not then kindly suggest me how i deal with fileupload control issue in view control ?
Best Regards
|
|
|
|
|
Rameez Raja wrote: It is server side control not the html file input control
There is no such thing as a server side control, on the client. The 'server side control' is rendered as a html control, that's all it could ever be. whatever happens, on postback, your control will contain the bytes of your file and it's name. viewstate is for persisting values between postbacks, a file is assigned, sent on that postback and forgotten.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Christian Graus wrote: There is no such thing as a server side control, on the client. The 'server side control' is rendered as a html control, that's all it could ever be. whatever happens, on postback, your control will contain the bytes of your file and it's name. viewstate is for persisting values between postbacks, a file is assigned, sent on that postback and forgotten.
Thanks for reply,
Ok iam agreed with you now how i deal with uplaoding the image may i have to store in folder Temprarly and called during displaying summary am i right ?
Suggest me good option to deal with uploading .
Best Regards
|
|
|
|
|
Yes, you need to write it to the file system if you want to display it after uploading.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Dear colleges,
I have the following case:
1. web_page.aspx, using UC1.ascx
2. When this page is launched, after user does some things (selects settings), I need to launch web_page2.aspx from UC1.ascx with some parameters.
3. web_page2.aspx uses another user control (UC2.ascx), which needs the parameters passed from step 2 (from UC1.ascx).
Bottom line:
1. I need to pass parameters from UC1.ascx to web_page2.aspx.
2. The I need to pass these parameters from web_page2.aspx to UC2.ascx
I tried the following, which I know will not serve my needs:
In my UC1.ascx:
<br />
object[] constructorParameters = new object[1];<br />
<br />
constructorParameters.SetValue(SocketUserSettings, 0);<br />
<br />
List<Type> constParamTypes = new List<Type>();<br />
foreach (object constParam in constructorParameters)<br />
{<br />
constParamTypes.Add(constParam.GetType());<br />
}<br />
<br />
UserControl ctl = Page.LoadControl("UC2.ascx") as UserControl;<br />
System.Reflection.ConstructorInfo constructor = ctl.GetType().BaseType.GetConstructor(constParamTypes.ToArray());<br />
<br />
if (constructor == null)<br />
{<br />
throw new MemberAccessException("The requested constructor was not found on : " + ctl.GetType().BaseType.ToString());<br />
}<br />
else<br />
{<br />
constructor.Invoke(ctl, constructorParameters);<br />
}<br />
And inside UC2.ascx constructor I did:
<br />
public SocketConnectionList(SocketParam SocketUserSettings)<br />
{<br />
m_propertiesSet = true;<br />
m_SocketUserSettings = SocketUserSettings;<br />
Response.Redirect("SocketConnectionListPage.aspx");<br />
}<br />
The problem with this code is that launching an aspx from a user control will cause launching another instance of user control for the page launch and hence the parameters passed are not accessible for the second instance.
Please you help is appreciated.
|
|
|
|
|
Don’t you think the approach you are using is a bit complicated?
You can rather create a public property in the User Control(UC1). Set this property when you load this control on Page1. This way you already passed the information to the control.
In the second scenario, make user of hidden variables/query string to pass on the information.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Thanks, but I am still not clear.
I have the info I need in UC1.ascx already.
I need this information to be passed to web_page2.aspx (which in it's turn should pass it to UC2.ascx).
You have mentioned hidden variables, what does that means?
Do you have a simple example showing that (even pseudo would fit fine).
Thanks for the prompt reply!
|
|
|
|
|
When a User Control is loaded into a web form, it becomes part of the WebPage itself. So you need to look at it from that perspective and not from a Design time angle.
That means whatever information is available to Web Form2 can be easily accessed by UC2 too.
Hidden Variables[^]
Query Strings[^]
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
hello
What was known as "Web Control Library" for ASP.NET is no longer continued in VS2005/2008 am I right?
I think I remember I used tree control from the library some years ago...
dev
|
|
|
|
|
Hi folks
I'm just trying to complete a registration sector and for that I've done evrything except for activation email. I know the algorithm and how to do that but my problem is where I can't get a beautiful activation number. I want to write and sql query by which I can select from 3 beggining letters of name, 2 final letters of last name and month and day of registration date and ... (which are enetered in registration form) . So I can make a complicated activation code. you know what do I mean!
my problem would be solved only if you tell me how I can write and handle that sql query for selection.
Thanks alot.
Proper Prepration Prevents Poor Performance! h
|
|
|
|
|
I would use GUIDs for codes to send for activation. SQL generates them natively.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
|
by defining like below in web.config file
<personalization defaultProvider="AspNetSqlPersonalizationProvider">
<providers>
<remove name="AspNetSqlPersonalizationProvider" />
<add name="AspNetSqlPersonalizationProvider" type="System.Web.UI.WebControls.WebParts.SqlPersonalizationProvider" connectionStringName="SqlServices" />
</providers>
</personalization>
we are able to save the data in sqlserver....any body please give me one example on webparts how to save the in oracle database
|
|
|
|
|
To use Oracle as your Database for personalization, you need to create a custom personalization provider for that.. see the following links for more info:
CUSTOM PERSONALIZATION
http://msdn.microsoft.com/en-us/library/aa479037.aspx
WEB PARTS ORACLE PERSONALIZATION
http://download.oracle.com/docs/html/E10928_01/OraclePersonalizationProviderClass.htm#BABCHDGI
|
|
|
|
|
Hi Friends,
I have used Ajax for paging in my application its work fine but when i click on my page at anywhere its getting a javascript error like top.screenleft is null or not an object when i debug it the error is pointing to ScriptResource.axd file. Please help me to give solution.
Thanks
|
|
|
|
|
Sounds like it's not working fine at all. All we can tell you, is to fix your code. If you want more help, consider telling us if you used AJAX, or if you used a framework that does AJAX, what your code looks like, the actual error ( i.e. the code that the debugger breaks into ) etc.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
When i generate excel in asp.net
it will generate but when i open & then saved this excel it showed
"save as type" "web page".
|
|
|
|
|
harish mehra wrote: when i open & then saved this excel it showed
"save as type" "web page
Yes. That's how web works. What is your question?
|
|
|
|
|
Hard to know exactly what you're doing from this gibberish ( it's not even a question ), but, I suspect you're failing to set the MIME type when you write your file down to the client.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|